If it's a TV and VIRTKEY_PAUSE is not mapped to a pad control, pause on app switch.

This commit is contained in:
Henrik Rydgård
2021-08-12 00:02:19 +02:00
parent 81b4c3b376
commit aa3daca293
3 changed files with 20 additions and 3 deletions
+11
View File
@@ -905,6 +905,17 @@ void RemoveButtonMapping(int btn) {
}
}
bool IsKeyMapped(int device, int key) {
for (auto &iter : g_controllerMap) {
for (auto &mappedKey : iter.second) {
if (mappedKey == KeyDef(device, key)) {
return true;
}
}
}
return false;
}
void SetKeyMapping(int btn, KeyDef key, bool replace) {
if (key.keyCode < 0)
return;