diff --git a/src/sdl_window.cpp b/src/sdl_window.cpp index 980c75e38..8ec6f85ec 100644 --- a/src/sdl_window.cpp +++ b/src/sdl_window.cpp @@ -242,7 +242,7 @@ void WindowSDL::parseInputConfig(const std::string& filename) { std::cerr << "Error opening file: " << filename << std::endl; return; } - + button_map.clear(); axis_map.clear(); int lineCount = 0; @@ -687,8 +687,6 @@ void WindowSDL::onKeyPress(const SDL_Event* event) { int ax = Input::GetAxis(-0x80, 0x80, axis_value); controller->Axis(0, axis, ax); } - - } // if we don't do this, then if we activate a mod keyed input and let go of the mod key first, @@ -700,7 +698,7 @@ void WindowSDL::updateModKeyedInputsManually(Frontend::KeyBinding& binding) { if (input.first.modifier != SDL_KMOD_NONE) { if ((input.first.modifier & binding.modifier) == 0) { WindowSDL::updateButton(binding, input.second, false); - } else { + } else if(input.first.key == binding.key) { mod_keyed_input_found = true; } } @@ -709,14 +707,13 @@ void WindowSDL::updateModKeyedInputsManually(Frontend::KeyBinding& binding) { if (input.first.modifier != SDL_KMOD_NONE) { if((input.first.modifier & binding.modifier) == 0) { controller->Axis(0, input.second.axis, Input::GetAxis(-0x80, 0x80, 0)); - } else { + } else if(input.first.key == binding.key) { mod_keyed_input_found = true; } } } // if both non mod keyed and mod keyed inputs are used and you press the key and then the mod key in a single frame, // both will activate but the simple one will not deactivate, unless i use this stupid looking workaround - //return; if(!mod_keyed_input_found) return; // in this case the fix for the fix for the wrong update order is not needed for(auto input : button_map) { if(input.first.modifier == SDL_KMOD_NONE) { diff --git a/user/keyboardInputConfig.ini b/user/keyboardInputConfig.ini index 60b29f5d1..0500a1637 100644 --- a/user/keyboardInputConfig.ini +++ b/user/keyboardInputConfig.ini @@ -6,6 +6,8 @@ # f9: toggle mouse capture # f8: reparse keyboard input (this) +# this is a mapping for bloodborne inspired by other souls titles on pc + # use another item (healing), change status in inventory triangle=f # dodge, back in inv @@ -15,7 +17,6 @@ cross=e # use quick item, remove item in inv square=r -# arrow keys, but triggers normal wasd too (please fix) # emergency extra bullets up=w,lalt # change quick item