final minor update before pull request

This commit is contained in:
kalaposfos13 2024-10-12 15:41:18 +02:00
parent 81e0f143cc
commit 94c076494a
2 changed files with 5 additions and 7 deletions

View File

@ -687,8 +687,6 @@ void WindowSDL::onKeyPress(const SDL_Event* event) {
int ax = Input::GetAxis(-0x80, 0x80, axis_value); int ax = Input::GetAxis(-0x80, 0x80, axis_value);
controller->Axis(0, axis, ax); 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, // 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 != SDL_KMOD_NONE) {
if ((input.first.modifier & binding.modifier) == 0) { if ((input.first.modifier & binding.modifier) == 0) {
WindowSDL::updateButton(binding, input.second, false); WindowSDL::updateButton(binding, input.second, false);
} else { } else if(input.first.key == binding.key) {
mod_keyed_input_found = true; 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 != SDL_KMOD_NONE) {
if((input.first.modifier & binding.modifier) == 0) { if((input.first.modifier & binding.modifier) == 0) {
controller->Axis(0, input.second.axis, Input::GetAxis(-0x80, 0x80, 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; 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, // 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 // 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 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) { for(auto input : button_map) {
if(input.first.modifier == SDL_KMOD_NONE) { if(input.first.modifier == SDL_KMOD_NONE) {

View File

@ -6,6 +6,8 @@
# f9: toggle mouse capture # f9: toggle mouse capture
# f8: reparse keyboard input (this) # 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 # use another item (healing), change status in inventory
triangle=f triangle=f
# dodge, back in inv # dodge, back in inv
@ -15,7 +17,6 @@ cross=e
# use quick item, remove item in inv # use quick item, remove item in inv
square=r square=r
# arrow keys, but triggers normal wasd too (please fix)
# emergency extra bullets # emergency extra bullets
up=w,lalt up=w,lalt
# change quick item # change quick item