fix buffed mapping (#767)

This commit is contained in:
lightmanLP
2024-12-19 13:55:22 -05:00
committed by GitHub
parent 0aa813dbd3
commit 3d8420e392
2 changed files with 13 additions and 5 deletions
@@ -207,8 +207,12 @@ bool ControllerButton::AddOrEditButtonMappingFromRawPress(CONTROLLERBUTTONS_T bi
bool ControllerButton::ProcessKeyboardEvent(KbEventType eventType, KbScancode scancode) {
if (mUseKeydownEventToCreateNewMapping && eventType == LUS_KB_EVENT_KEY_DOWN) {
mKeyboardScancodeForNewMapping = scancode;
return true;
if (eventType == LUS_KB_EVENT_KEY_DOWN) {
mKeyboardScancodeForNewMapping = scancode;
return true;
} else {
mKeyboardScancodeForNewMapping = LUS_KB_UNKNOWN;
}
}
bool result = false;
@@ -319,9 +319,13 @@ void ControllerStick::UpdatePad(int8_t& x, int8_t& y) {
}
bool ControllerStick::ProcessKeyboardEvent(KbEventType eventType, KbScancode scancode) {
if (mUseKeydownEventToCreateNewMapping && eventType == LUS_KB_EVENT_KEY_DOWN) {
mKeyboardScancodeForNewMapping = scancode;
return true;
if (mUseKeydownEventToCreateNewMapping) {
if (eventType == LUS_KB_EVENT_KEY_DOWN) {
mKeyboardScancodeForNewMapping = scancode;
return true;
} else {
mKeyboardScancodeForNewMapping = LUS_KB_UNKNOWN;
}
}
bool result = false;