1
0
mirror of synced 2024-11-27 17:00:53 +01:00

Change card insert to keybind

This commit is contained in:
BroGamer 2022-08-15 20:27:41 +12:00
parent 9759e46dd1
commit 2755f4883e
2 changed files with 18 additions and 16 deletions

31
dist/keyconfig.toml vendored
View File

@ -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

View File

@ -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;