diff --git a/config/blocklist b/config/blocklist index 055ae24f2..1925e9092 100644 --- a/config/blocklist +++ b/config/blocklist @@ -14,3 +14,4 @@ retroarch #pinning to release versions for stability. vita3k-sa #Patch updates needed. gzdoom-sa #Stick to release versions. openbor #newer versions break controls, needs research. +gptokeyb #Newer versions break hotkeys diff --git a/packages/emulators/standalone/drastic-sa/config/RK3399/drastic.cfg b/packages/emulators/standalone/drastic-sa/config/RK3399/drastic.cfg index b101b8db8..1049e5cb3 100644 --- a/packages/emulators/standalone/drastic-sa/config/RK3399/drastic.cfg +++ b/packages/emulators/standalone/drastic-sa/config/RK3399/drastic.cfg @@ -51,11 +51,11 @@ controls_a[CONTROL_INDEX_TOUCH_CURSOR_DOWN] = 65535 controls_a[CONTROL_INDEX_TOUCH_CURSOR_LEFT] = 65535 controls_a[CONTROL_INDEX_TOUCH_CURSOR_RIGHT] = 65535 controls_a[CONTROL_INDEX_TOUCH_CURSOR_PRESS] = 65535 -controls_a[CONTROL_INDEX_MENU] = 65535 -controls_a[CONTROL_INDEX_SAVE_STATE] = 65535 -controls_a[CONTROL_INDEX_LOAD_STATE] = 65535 -controls_a[CONTROL_INDEX_FAST_FORWARD] = 65535 -controls_a[CONTROL_INDEX_SWAP_SCREENS] = 65535 +controls_a[CONTROL_INDEX_MENU] = 120 +controls_a[CONTROL_INDEX_SAVE_STATE] = 115 +controls_a[CONTROL_INDEX_LOAD_STATE] = 108 +controls_a[CONTROL_INDEX_FAST_FORWARD] = 116 +controls_a[CONTROL_INDEX_SWAP_SCREENS] = 109 controls_a[CONTROL_INDEX_SWAP_ORIENTATION_A] = 65535 controls_a[CONTROL_INDEX_SWAP_ORIENTATION_B] = 65535 controls_a[CONTROL_INDEX_LOAD_GAME] = 65535 diff --git a/packages/emulators/standalone/drastic-sa/config/drastic.gptk b/packages/emulators/standalone/drastic-sa/config/drastic.gptk new file mode 100644 index 000000000..a8f622cf8 --- /dev/null +++ b/packages/emulators/standalone/drastic-sa/config/drastic.gptk @@ -0,0 +1,32 @@ +back = \\ +start = \\ +a = \\ +a_hk = a +b = \\ +b_hk = b +x = \\ +x_hk = x +y = \\ +y_hk = y +l1 = \\ +l1_hk = l +l2 = \\ +l2_hk = m +l3 = \\ +r1 = \\ +r1_hk = s +r2 = \\ +r2_hk = t +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 = \\ diff --git a/packages/emulators/standalone/drastic-sa/package.mk b/packages/emulators/standalone/drastic-sa/package.mk index e79ecc385..ad5f2a187 100644 --- a/packages/emulators/standalone/drastic-sa/package.mk +++ b/packages/emulators/standalone/drastic-sa/package.mk @@ -26,6 +26,7 @@ makeinstall_target() { mkdir -p ${INSTALL}/usr/config/drastic/config cp -rf ${PKG_BUILD}/drastic_aarch64/* ${INSTALL}/usr/config/drastic/ cp -rf ${PKG_DIR}/config/${DEVICE}/* ${INSTALL}/usr/config/drastic/config/ + cp -rf ${PKG_DIR}/config/drastic.gptk ${INSTALL}/usr/config/drastic/ } post_install() { diff --git a/packages/emulators/standalone/drastic-sa/scripts/start_drastic.sh b/packages/emulators/standalone/drastic-sa/scripts/start_drastic.sh index db0b13f05..ec4b5c9a8 100644 --- a/packages/emulators/standalone/drastic-sa/scripts/start_drastic.sh +++ b/packages/emulators/standalone/drastic-sa/scripts/start_drastic.sh @@ -7,6 +7,11 @@ jslisten set "-9 drastic" +#load gptokeyb support files +control-gen_init.sh +source /storage/.config/gptokeyb/control.ini +get_controls + #Copy drastic files to .config if [ ! -d "/storage/.config/drastic" ]; then mkdir -p /storage/.config/drastic/ @@ -26,6 +31,11 @@ do fi done +#Copy drastic files to .config +if [ ! -f "/storage/.config/drastic/drastic.gptk" ]; then + cp -r /usr/config/drastic/drastic.gptk /storage/.config/drastic/ +fi + #Make drastic savestate folder if [ ! -d "/storage/roms/savestates/nds" ]; then mkdir -p /storage/roms/savestates/nds @@ -41,4 +51,6 @@ ln -sf /storage/roms/nds /storage/.config/drastic/backup cd /storage/.config/drastic/ @LIBEGL@ +$GPTOKEYB "drastic" -c "drastic.gptk" & ./drastic "$1" +kill -9 $(pidof gptokeyb) diff --git a/packages/emulators/tools/gptokeyb/package.mk b/packages/emulators/tools/gptokeyb/package.mk index c99e18225..f349141fe 100644 --- a/packages/emulators/tools/gptokeyb/package.mk +++ b/packages/emulators/tools/gptokeyb/package.mk @@ -2,7 +2,7 @@ # Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert) PKG_NAME="gptokeyb" -PKG_VERSION="be8478deed8552293f5ae66cbcf415d23de9be0f" +PKG_VERSION="0303b36b5376a9b25cf82a53ed4242509daf14e9" PKG_ARCH="any" PKG_LICENSE="GPLv3" PKG_SITE="https://github.com/EmuELEC/gptokeyb"