Core: Check for initialized GCPad before resetting rumble
This commit is contained in:
parent
ceed6890df
commit
016ef43b27
|
@ -250,6 +250,8 @@ static void ResetRumble()
|
||||||
GCAdapter::ResetRumble();
|
GCAdapter::ResetRumble();
|
||||||
#endif
|
#endif
|
||||||
#if defined(CIFACE_USE_XINPUT) || defined(CIFACE_USE_DINPUT)
|
#if defined(CIFACE_USE_XINPUT) || defined(CIFACE_USE_DINPUT)
|
||||||
|
if (!Pad::IsInitialized())
|
||||||
|
return;
|
||||||
for (int i = 0; i < 4; ++i)
|
for (int i = 0; i < 4; ++i)
|
||||||
Pad::ResetRumble(i);
|
Pad::ResetRumble(i);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -45,6 +45,11 @@ void LoadConfig()
|
||||||
s_config.LoadConfig(true);
|
s_config.LoadConfig(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsInitialized()
|
||||||
|
{
|
||||||
|
return !s_config.ControllersNeedToBeCreated();
|
||||||
|
}
|
||||||
|
|
||||||
GCPadStatus GetStatus(int pad_num)
|
GCPadStatus GetStatus(int pad_num)
|
||||||
{
|
{
|
||||||
return static_cast<GCPad*>(s_config.GetController(pad_num))->GetInput();
|
return static_cast<GCPad*>(s_config.GetController(pad_num))->GetInput();
|
||||||
|
|
|
@ -21,6 +21,7 @@ namespace Pad
|
||||||
void Shutdown();
|
void Shutdown();
|
||||||
void Initialize();
|
void Initialize();
|
||||||
void LoadConfig();
|
void LoadConfig();
|
||||||
|
bool IsInitialized();
|
||||||
|
|
||||||
InputConfig* GetConfig();
|
InputConfig* GetConfig();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue