mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-17 03:14:34 +01:00
Merge pull request #17217 from hrydgard/logic-fix
Controls: Logic fix, optimization, remove hack
This commit is contained in:
2 files changed
+4
-8
No files matched your search
+2
-8
@@ -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<MultiInputMapping> *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() {
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user