chore: cleanup GetControllerType
This commit is contained in:
1 parent
e6ff0039f4
commit
0440f9974b
4 files changed
+18
-6
No files matched your search
@@ -177,10 +177,7 @@ void C_4JInput::GetText(uint16_t *UTF16String)
|
|||||||
|
|
||||||
EControllerType C_4JInput::GetControllerType(int iPad)
|
EControllerType C_4JInput::GetControllerType(int iPad)
|
||||||
{
|
{
|
||||||
if(InternalInputManager.IsPadConnected(iPad))
|
return InternalInputManager.GetControllerType(iPad); //strk13r - mrow mrow mrow mrowwwwwwwwwww, i am silly kitty
|
||||||
{
|
|
||||||
return InternalInputManager.GetControllerType(iPad); //strk13r - mrow mrow mrow mrowwwwwwwwwww, i am silly kitty
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool C_4JInput::VerifyStrings(WCHAR **pwStringA, int iStringC, int (*Func)(LPVOID, STRING_VERIFY_RESPONSE *), LPVOID lpParam)
|
bool C_4JInput::VerifyStrings(WCHAR **pwStringA, int iStringC, int (*Func)(LPVOID, STRING_VERIFY_RESPONSE *), LPVOID lpParam)
|
||||||
|
|||||||
@@ -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
|
//str1k3r - renamed to match the Orbis Input lib, why did i rename it cause tism
|
||||||
EControllerType CInput::GetControllerType(int iPad)
|
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)
|
void CInput::SetJoypadMapVal(int iPad, unsigned char ucMap)
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ public:
|
|||||||
unsigned int m_uiSigninJoypadMask;
|
unsigned int m_uiSigninJoypadMask;
|
||||||
bool m_bIsMenuDisplayed[MAX_JOYPADS];
|
bool m_bIsMenuDisplayed[MAX_JOYPADS];
|
||||||
|
|
||||||
|
EControllerType m_LastControllerType;
|
||||||
CForceFeedback m_ForceFeedback;
|
CForceFeedback m_ForceFeedback;
|
||||||
CKeyboard m_Keyboard;
|
CKeyboard m_Keyboard;
|
||||||
|
|
||||||
|
|||||||
@@ -82,8 +82,8 @@ public:
|
|||||||
bool IsFullVersion();
|
bool IsFullVersion();
|
||||||
void SetSignInChangeCallback(void ( *Func)(LPVOID, bool, unsigned int),LPVOID lpParam);
|
void SetSignInChangeCallback(void ( *Func)(LPVOID, bool, unsigned int),LPVOID lpParam);
|
||||||
void SetNotificationsCallback(void ( *Func)(LPVOID, DWORD, unsigned int),LPVOID lpParam);
|
void SetNotificationsCallback(void ( *Func)(LPVOID, DWORD, unsigned int),LPVOID lpParam);
|
||||||
bool RegionIsNorthAmerica(void);
|
|
||||||
bool LocaleIsUSorCanada(void);
|
bool LocaleIsUSorCanada(void);
|
||||||
|
bool LocaleIsChina(void);
|
||||||
HRESULT GetLiveConnectionStatus();
|
HRESULT GetLiveConnectionStatus();
|
||||||
bool IsSystemUIDisplayed();
|
bool IsSystemUIDisplayed();
|
||||||
void SetProfileReadErrorCallback(void ( *Func)(LPVOID), LPVOID lpParam);
|
void SetProfileReadErrorCallback(void ( *Func)(LPVOID), LPVOID lpParam);
|
||||||
|
|||||||
Reference in new issue
Block a user