mirror of
https://github.com/izzy2lost/libultraship.git
synced 2026-06-19 01:16:13 -07:00
fix buffed mapping (#767)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user