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:
Henrik Rydgard 2015-01-02 16:43:08 +01:00
parent 13c4a22967
commit 87d221e069
2 changed files with 9 additions and 5 deletions

View File

@ -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;
}

2
native

@ -1 +1 @@
Subproject commit 4dce24d05cbe02e8bc711698aca01193f1a36433
Subproject commit 7f0387a31e6391bc9ae7a87f4fa19be171478a46