Merge pull request #1899 from r3claimer/next

Flycast SA better hotkeys
This commit is contained in:
r3claimer
2025-10-03 22:07:20 -07:00
committed by GitHub
5 changed files with 69 additions and 7 deletions

View File

@@ -0,0 +1,11 @@
digital]
bind0 = 9:btn_fforward
bind1 = 15:btn_jump_state
bind2 = 22:btn_quick_save
[emulator]
dead_zone = 10
mapping_name = Keyboard
rumble_power = 100
saturation = 100
version = 3

View File

@@ -7,8 +7,8 @@ bind4 = 3-:axis2_left
bind5 = 3+:axis2_right
bind6 = 4-:axis2_up
bind7 = 4+:axis2_down
bind8 = 6+:btn_trigger_left
bind9 = 7+:btn_trigger_right
bind8 = 6+:btn_trigger2_left
bind9 = 7+:btn_trigger2_right
[digital]
bind0 = 0:btn_a
@@ -18,8 +18,8 @@ bind11 = 14:btn_dpad1_right
bind12 = 15:btn_menu
bind2 = 2:btn_y
bind3 = 3:btn_x
bind4 = 4:btn_jump_state
bind5 = 5:btn_quick_save
bind4 = 4:btn_trigger_left
bind5 = 5:btn_trigger_right
bind6 = 6:reload
bind7 = 7:btn_start
bind8 = 11:btn_dpad1_up

View File

@@ -0,0 +1,31 @@
back = \\
start = \\
a = \\
b = \\
x = \\
y = \\
l1 = \\
l1_hk = l
l2 = \\
l2_hk = \\
l3 = \\
r1 = \\
r1_hk = s
r2 = \\
r2_hk = f
r3 = \\
up = \\
down = \\
left = \\
right = \\
left_analog_up = \\
left_analog_down = \\
left_analog_left = \\
left_analog_right = \\
right_analog_up = \\
right_analog_down = \\
right_analog_left = \\
right_analog_right = \\
deadzone_triggers = \\
mouse_scale = \\
mouse_delay = \\

View File

@@ -42,6 +42,8 @@ makeinstall_target() {
cp ${PKG_BUILD}/.${TARGET_NAME}/flycast ${INSTALL}/usr/bin/flycast
cp ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin
cp -r ${PKG_DIR}/config/${DEVICE}/* ${INSTALL}/usr/config/flycast
cp -rf ${PKG_DIR}/config/flycast.gptk ${INSTALL}/usr/config/flycast
cp -rf ${PKG_DIR}/config/SDL_Keyboard.cfg ${INSTALL}/usr/config/flycast/mappings
chmod +x ${INSTALL}/usr/bin/*
}

View File

@@ -6,6 +6,11 @@
. /etc/profile
set_kill set "-9 flycast"
#load gptokeyb support files
control-gen_init.sh
source /storage/.config/gptokeyb/control.ini
get_controls
# Conf files vars
SOURCE_DIR="/usr/config/flycast"
CONF_DIR="/storage/.config/flycast"
@@ -13,22 +18,33 @@ FLYCAST_INI="emu.cfg"
#Check if flycast exists in .config
if [ ! -d "/storage/.config/flycast" ]; then
cp -r "${SOURCE_DIR}" "${CONF_DIR}"
cp -r "${SOURCE_DIR}" "${CONF_DIR}"
fi
#Move save file storage/roms
if [ -d "${CONF_DIR}/data" ]; then
mv "${CONF_DIR}/data" "/storage/roms/dreamcast/"
mv "${CONF_DIR}/data" "/storage/roms/dreamcast/"
fi
#Make flycast bios folder
if [ ! -d "/storage/roms/bios/dc" ]; then
mkdir -p "/storage/roms/bios/dc"
mkdir -p "/storage/roms/bios/dc"
fi
#Link .config/flycast to .local
ln -sf "/storage/roms/bios/dc" "/storage/roms/dreamcast/data"
#Make sure flycast gptk config exists
if [ ! -f "${CONF_DIR}/flycast.gptk" ]; then
cp -r "/usr/config/flycast/flycast.gptk" "${CONF_DIR}/flycast.gptk"
fi
#Make sure flycast gptk SDL_Keyboard.cfg exists
if [ ! -f "${CONF_DIR}/mappings/SDL_Keyboard.cfg" ]; then
cp -r "/usr/config/flycast/mappings/SDL_Keyboard.cfg" "${CONF_DIR}/mappings/SDL_Keyboard.cfg"
fi
#Emulation Station Features
GAME=$(echo "${1}"| sed "s#^/.*/##")
PLATFORM=$(echo "${2}"| sed "s#^/.*/##")
@@ -128,4 +144,6 @@ fi
echo "Launching /usr/bin/flycast ${1}"
#Run flycast emulator
$GPTOKEYB "flycast" -c "${CONF_DIR}/flycast.gptk" &
${EMUPERF} /usr/bin/flycast "${1}"
kill -9 "$(pidof gptokeyb)"