From e8c545602102e1f303b88c06c0c8b629cd3b2a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 8 Dec 2023 16:24:48 +0100 Subject: [PATCH] Don't try to autoconfigure XInput controls on other platforms than Windows --- Core/KeyMap.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Core/KeyMap.cpp b/Core/KeyMap.cpp index 5a9235d620..f408182e59 100644 --- a/Core/KeyMap.cpp +++ b/Core/KeyMap.cpp @@ -822,8 +822,12 @@ void AutoConfForPad(const std::string &name) { SetDefaultKeyMap(DEFAULT_MAPPING_ANDROID_PAD, false); } #else - // TODO: Should actually check for XInput? - if (name.find("Xbox") != std::string::npos) { +#if PPSSPP_PLATFORM(WINDOWS) + const bool platformSupportsXinput = true; +#else + const bool platformSupportsXinput = false; +#endif + if (platformSupportsXinput && name.find("Xbox") != std::string::npos) { SetDefaultKeyMap(DEFAULT_MAPPING_XINPUT, false); } else { SetDefaultKeyMap(DEFAULT_MAPPING_PAD, false);