forked from str1k3r/4JLibs-VS2012
feat: combine all switch types into one
This commit is contained in:
1 parent
fdef90f8e7
commit
a9df365c5c
1 file changed
+14
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user