chore: cleanup GetControllerType

This commit is contained in:
2026-09-12 17:31:10 -04:00
parent e6ff0039f4
commit 0440f9974b
4 changed files with 18 additions and 6 deletions
+15 -1
View File
@@ -317,7 +317,21 @@ unsigned int CInput::GetGameJoypadMaps(unsigned char ucMap, unsigned char ucActi
//str1k3r - renamed to match the Orbis Input lib, why did i rename it cause tism
EControllerType CInput::GetControllerType(int iPad)
{
return GetControllerName(SDL_GetGamepadType(m_Joypads[iPad].m_pGamepad)); // str1k3r - magic we return it :shocked:
//str1k3r - if the pad is connected then check the type, if we are the same type or we arent connected return the last type
if(InternalInputManager.IsPadConnected(iPad))
{
EControllerType ControllerType = GetControllerName(SDL_GetGamepadType(m_Joypads[iPad].m_pGamepad));
if(ControllerType != m_LastControllerType)
{
m_LastControllerType = ControllerType;
return ControllerType;
}
return m_LastControllerType;
}
return m_LastControllerType;
}
void CInput::SetJoypadMapVal(int iPad, unsigned char ucMap)