From 8b6587dc8826a3b39c9526d36094f498ddbae28a Mon Sep 17 00:00:00 2001 From: nastys <@> Date: Sat, 26 Oct 2019 15:39:11 +0200 Subject: [PATCH] Keybinding fixes --- source-code/data/plugins/keyconfig.ini | 15 ++++++++------- .../TLAC/Components/Input/InputEmulator.cpp | 8 ++++---- .../plugins/TLAC/Components/Input/InputEmulator.h | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/source-code/data/plugins/keyconfig.ini b/source-code/data/plugins/keyconfig.ini index cf6700d..ec70e66 100644 --- a/source-code/data/plugins/keyconfig.ini +++ b/source-code/data/plugins/keyconfig.ini @@ -1,3 +1,4 @@ +[keyconfig] ######################################### # /!\ WARNING: DO NOT EDIT WITH NOTEPAD!# ######################################### @@ -15,10 +16,10 @@ mouse_scroll_pv_selection = true touch_slider_emulation_speed = 750.0 # Preferred Xinput controller (0-3) -xinput_preferred = 0 +xinput_preferred =0 # Rumble (Xinput) -rumble = true +rumble =true # JVS Buttons: JVS_TEST = F1 @@ -33,9 +34,9 @@ JVS_CIRCLE = D, L, Ds4_Circle, Ds4_DPad_Right, Ds4_L_Trigger, Ds4_R_Trigger, XIN JVS_LEFT = Left, Up, Ds4_L1, Ds4_L_Stick_Up, Ds4_R_Stick_Up, XINPUT_LS JVS_RIGHT = Right, Down, Ds4_R1, Ds4_L_Stick_Down, Ds4_R_Stick_Down, XINPUT_RS -MENU_L = Left, Up, Ds4_L1, Ds4_L_Stick_Up, Ds4_R_Stick_Up, XINPUT_LS, Ds4_DPad_Left, Ds4_DPad_Up, XINPUT_LEFT, XINPUT_UP, Q, U, Ds4_L_Stick_Left, XINPUT_LLEFT -MENU_R = Right, Down, Ds4_R1, Ds4_L_Stick_Down, Ds4_R_Stick_Down, XINPUT_RS, Ds4_DPad_Right, Ds4_DPad_Down, XINPUT_RIGHT, XINPUT_DOWN, E, O, Ds4_L_Stick_Right, XINPUT_LRIGHT -MENU_CIRCLE = Spacebar, D, L, Ds4_Circle, Ds4_DPad_Right, Ds4_L_Trigger, Ds4_R_Trigger, XINPUT_B, XINPUT_RIGHT, XINPUT_LT, XINPUT_RT +MENU_L = Left, Up, Ds4_L1, Ds4_L_Stick_Up, Ds4_R_Stick_Up, XINPUT_LS, Ds4_DPad_Left, Ds4_DPad_Up, XINPUT_LEFT, XINPUT_UP, Q, U, Ds4_L_Stick_Left, XINPUT_LLEFT, Ds4_L_Stick_Up, XINPUT_LUP, Ds4_R_Stick_Left, XINPUT_RLEFT, Ds4_R_Stick_Up, XINPUT_RUP +MENU_R = Right, Down, Ds4_R1, Ds4_L_Stick_Down, Ds4_R_Stick_Down, XINPUT_RS, Ds4_DPad_Right, Ds4_DPad_Down, XINPUT_RIGHT, XINPUT_DOWN, E, O, Ds4_L_Stick_Right, XINPUT_LRIGHT, Ds4_L_Stick_Down, XINPUT_LDOWN, Ds4_R_Stick_Right, XINPUT_RRIGHT, Ds4_R_Stick_Down, XINPUT_RDOWN +MENU_CIRCLE_STACK = Spacebar # Touch Slider: LEFT_SIDE_SLIDE_LEFT = Q, Ds4_L_Stick_Left, XINPUT_LLEFT @@ -106,7 +107,7 @@ RIGHT_SIDE_SLIDE_RIGHT = O, Ds4_R_Stick_Right, XINPUT_RRIGHT # "XINPUT_LT", "XINPUT_RT" # - Left Joystick -# "XINPUT_LLEFT", "XINPUT_LRIGHT", "XINPUT_LSB" +# "XINPUT_LLEFT", "XINPUT_LRIGHT", "XINPUT_LUP", "XINPUT_LDOWN", "XINPUT_LSB" # - Right Joystick -# "XINPUT_RLEFT", "XINPUT_RRIGHT", "XINPUT_RSB" +# "XINPUT_RLEFT", "XINPUT_RRIGHT", "XINPUT_RUP", "XINPUT_RDOWN", "XINPUT_RSB" diff --git a/source-code/source/plugins/TLAC/Components/Input/InputEmulator.cpp b/source-code/source/plugins/TLAC/Components/Input/InputEmulator.cpp index 879b269..1760a70 100644 --- a/source-code/source/plugins/TLAC/Components/Input/InputEmulator.cpp +++ b/source-code/source/plugins/TLAC/Components/Input/InputEmulator.cpp @@ -45,7 +45,7 @@ namespace TLAC::Components delete MenuLBinding; delete MenuRBinding; - delete MenuCircleBinding; + delete MenuCircleStackBinding; } const char* InputEmulator::GetDisplayName() @@ -76,7 +76,7 @@ namespace TLAC::Components MenuLBinding = new Binding(); MenuRBinding = new Binding(); - MenuCircleBinding = new Binding(); + MenuCircleStackBinding = new Binding(); FileSystem::ConfigFile configFile(framework::GetModuleDirectory(), KEY_CONFIG_FILE_NAME); configFile.OpenRead(); @@ -92,7 +92,7 @@ namespace TLAC::Components Config::BindConfigKeys(configFile.ConfigMap, "JVS_RIGHT", *RightBinding, { "E", "O" }); Config::BindConfigKeys(configFile.ConfigMap, "MENU_L", *MenuLBinding, { "Left", "Up" }); Config::BindConfigKeys(configFile.ConfigMap, "MENU_R", *MenuRBinding, { "Down", "Right" }); - Config::BindConfigKeys(configFile.ConfigMap, "MENU_CIRCLE", *MenuCircleBinding, { "D", "L", "Spacebar" }); + Config::BindConfigKeys(configFile.ConfigMap, "MENU_CIRCLE_STACK", *MenuCircleStackBinding, { "D", "L", "Spacebar" }); mouseScrollPvSelection = configFile.GetBooleanValue("mouse_scroll_pv_selection"); } @@ -273,7 +273,7 @@ namespace TLAC::Components buttons |= JVS_SQUARE; if (buttonTestFunc(BatsuBinding)) buttons |= JVS_CROSS; - if (buttonTestFunc(MaruBinding)) + if (buttonTestFunc(MaruBinding) || (buttonTestFunc(MenuCircleStackBinding) && (!(*(GameState*)CURRENT_GAME_STATE_ADDRESS == GS_GAME && *(SubGameState*)CURRENT_GAME_SUB_STATE_ADDRESS == SUB_GAME_MAIN) || Pause::pause))) buttons |= JVS_CIRCLE; if (buttonTestFunc(LeftBinding)) diff --git a/source-code/source/plugins/TLAC/Components/Input/InputEmulator.h b/source-code/source/plugins/TLAC/Components/Input/InputEmulator.h index 58d5b57..96e1282 100644 --- a/source-code/source/plugins/TLAC/Components/Input/InputEmulator.h +++ b/source-code/source/plugins/TLAC/Components/Input/InputEmulator.h @@ -34,7 +34,7 @@ namespace TLAC::Components Input::Binding* MenuLBinding; Input::Binding* MenuRBinding; - Input::Binding* MenuCircleBinding; + Input::Binding* MenuCircleStackBinding; InputEmulator(); ~InputEmulator();