diff --git a/Core/KeyMap.cpp b/Core/KeyMap.cpp index d359789a53..bdb50d98b7 100644 --- a/Core/KeyMap.cpp +++ b/Core/KeyMap.cpp @@ -110,12 +110,6 @@ void UpdateNativeMenuKeys() { cancelKeys.push_back(hardcodedCancelKeys[i]); } - // For DInput controllers on Windows. Doesn't clash with XInput because that uses BUTTON_X etc. -#if PPSSPP_PLATFORM(WINDOWS) && !PPSSPP_PLATFORM(UWP) - confirmKeys.push_back(InputMapping(DEVICE_ID_PAD_0, NKCODE_BUTTON_2)); - cancelKeys.push_back(InputMapping(DEVICE_ID_PAD_0, NKCODE_BUTTON_3)); -#endif - SetDPadKeys(upKeys, downKeys, leftKeys, rightKeys); SetConfirmCancelKeys(confirmKeys, cancelKeys); SetTabLeftRightKeys(tabLeft, tabRight); @@ -527,7 +521,8 @@ bool InputMappingsFromPspButton(int btn, std::vector *mapping } bool mapped = false; for (auto iter2 = iter->second.begin(); iter2 != iter->second.end(); ++iter2) { - if (mappings && (!ignoreMouse || iter2->HasMouse())) { + bool ignore = ignoreMouse && iter2->HasMouse(); + if (mappings && !ignore) { mapped = true; mappings->push_back(*iter2); } @@ -650,7 +645,6 @@ void SetInputMapping(int btn, const MultiInputMapping &key, bool replace) { for (auto &mapping : key.mappings) { g_seenDeviceIds.insert(mapping.deviceId); } - UpdateNativeMenuKeys(); } void RestoreDefault() { diff --git a/UI/ControlMappingScreen.cpp b/UI/ControlMappingScreen.cpp index eebdee261e..0f33b1aa5a 100644 --- a/UI/ControlMappingScreen.cpp +++ b/UI/ControlMappingScreen.cpp @@ -188,6 +188,7 @@ void SingleControlMapper::MappedCallback(MultiInputMapping kdf) { SetFocus(); break; } + KeyMap::UpdateNativeMenuKeys(); g_Config.bMapMouse = false; } @@ -1169,6 +1170,7 @@ UI::EventReturn VisualMappingScreen::OnBindAll(UI::EventParams &e) { void VisualMappingScreen::HandleKeyMapping(MultiInputMapping key) { KeyMap::SetInputMapping(nextKey_, key, replace_); + KeyMap::UpdateNativeMenuKeys(); if (bindAll_ < 0) { // For analog, we do each direction in a row.