diff --git a/dist/keyconfig.toml b/dist/keyconfig.toml index f69b657..bd3ff58 100644 --- a/dist/keyconfig.toml +++ b/dist/keyconfig.toml @@ -1,21 +1,22 @@ -EXIT = [ "ESCAPE" ] +EXIT = ["ESCAPE"] -TEST = [ "F1" ] -SERVICE = [ "F2" ] -DEBUG_UP = [ "UPARROW" ] -DEBUG_DOWN = [ "DOWNARROW" ] -DEBUG_ENTER = [ "ENTER" ] +TEST = ["F1"] +SERVICE = ["F2"] +DEBUG_UP = ["UPARROW"] +DEBUG_DOWN = ["DOWNARROW"] +DEBUG_ENTER = ["ENTER"] -COIN_ADD = [ "ENTER", "SDL_START" ] +COIN_ADD = ["ENTER", "SDL_START"] +CARD_INSERT = ["P"] -P1_LEFT_BLUE = [ "D", "SDL_LTRIGGER" ] -P1_LEFT_RED = [ "F", "SDL_LSTICK_PRESS" ] -P1_RIGHT_RED = [ "J", "SDL_RSTICK_PRESS" ] -P1_RIGHT_BLUE = [ "K", "SDL_RTRIGGER" ] -P2_LEFT_BLUE = [ ] -P2_LEFT_RED = [ ] -P2_RIGHT_RED = [ ] -P2_RIGHT_BLUE = [ ] +P1_LEFT_BLUE = ["D", "SDL_LTRIGGER"] +P1_LEFT_RED = ["F", "SDL_LSTICK_PRESS"] +P1_RIGHT_RED = ["J", "SDL_RSTICK_PRESS"] +P1_RIGHT_BLUE = ["K", "SDL_RTRIGGER"] +P2_LEFT_BLUE = [] +P2_LEFT_RED = [] +P2_RIGHT_RED = [] +P2_RIGHT_BLUE = [] # F1 through F12 # NUM0 through NUM9 diff --git a/src/dllmain.c b/src/dllmain.c index 03bbef0..2b4b484 100644 --- a/src/dllmain.c +++ b/src/dllmain.c @@ -18,6 +18,7 @@ Keybindings DEBUG_UP = { .keycodes = { VK_UP } }; Keybindings DEBUG_DOWN = { .keycodes = { VK_DOWN } }; Keybindings DEBUG_ENTER = { .keycodes = { VK_RETURN } }; Keybindings COIN_ADD = { .keycodes = { VK_RETURN }, .buttons = { SDL_CONTROLLER_BUTTON_START } }; +Keybindings CARD_INSERT = { .keycodes = { 'P' } }; Keybindings P1_LEFT_BLUE = { .keycodes = { 'D' }, .axis = { SDL_AXIS_LTRIGGER_DOWN } }; Keybindings P1_LEFT_RED = { .keycodes = { 'F' }, .buttons = { SDL_CONTROLLER_BUTTON_LEFTSTICK } }; Keybindings P1_RIGHT_RED = { .keycodes = { 'J' }, .buttons = { SDL_CONTROLLER_BUTTON_RIGHTSTICK } }; @@ -130,7 +131,7 @@ HOOK_DYNAMIC (u64, __stdcall, bngrw_attach, i32 a1, char *a2, i32 a3, i32 a4, ca } HOOK_DYNAMIC (i32, __stdcall, bngrw_reqWaitTouch, u32 a1, i32 a2, u32 a3, callbackTouch callback, u64 a5) { - if (!GetAsyncKeyState (VK_RETURN)) return -1; + if (IsButtonTapped (CARD_INSERT)) return -1; touch = callback; touchData = a5; return 1;