mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 17:23:40 +01:00
Android: Ignore back-button events from other devices than Default if the back button is mapped.
Update native. Should help #7254.
This commit is contained in:
1 parent
13c4a22967
commit
87d221e069
2 files changed
+9
-5
No files matched your search
+8
-4
@@ -408,10 +408,6 @@ inline void EmuScreen::setVKeyAnalogY(int stick, int virtualKeyMin, int virtualK
|
||||
}
|
||||
|
||||
bool EmuScreen::key(const KeyInput &key) {
|
||||
if ((key.flags & KEY_DOWN) && key.keyCode == NKCODE_BACK) {
|
||||
pauseTrigger_ = true;
|
||||
}
|
||||
|
||||
std::vector<int> pspKeys;
|
||||
KeyMap::KeyToPspButton(key.deviceId, key.keyCode, &pspKeys);
|
||||
|
||||
@@ -423,6 +419,14 @@ bool EmuScreen::key(const KeyInput &key) {
|
||||
for (size_t i = 0; i < pspKeys.size(); i++) {
|
||||
pspKey(pspKeys[i], key.flags);
|
||||
}
|
||||
|
||||
if (!pspKeys.size() || key.deviceId == DEVICE_ID_DEFAULT) {
|
||||
if ((key.flags & KEY_DOWN) && key.keyCode == NKCODE_BACK) {
|
||||
pauseTrigger_ = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return pspKeys.size() > 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user