feat: combine all switch types into one

This commit is contained in:
2026-08-08 22:44:09 -04:00
parent fdef90f8e7
commit a9df365c5c
+14 -1
View File
@@ -166,7 +166,20 @@ void C_4JInput::GetText(uint16_t *UTF16String)
}
const char* C_4JInput::PollControllerType(int ipad) {
return InternalInputManager.GetGamepadType(ipad);
const char* GamepadType = InternalInputManager.GetGamepadType(ipad);
if (!GamepadType)
return "UNKNOWN";
if (strcmp(GamepadType, "SWITCH_PRO") == 0 ||
strcmp(GamepadType, "JOYCON_PAIR") == 0 ||
strcmp(GamepadType, "JOYCON_L") == 0 ||
strcmp(GamepadType, "JOYCON_R") == 0)
{
return "SWITCH";
}
return GamepadType; // str1k3r - if not one of the switch types, return the type itself
}
bool C_4JInput::VerifyStrings(WCHAR **pwStringA, int iStringC, int (*Func)(LPVOID, STRING_VERIFY_RESPONSE *), LPVOID lpParam)