mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 19:38:06 -04:00
Check first device on gamepad init
This commit is contained in:
parent
30c14be3ed
commit
2f21b4e7cf
@ -481,14 +481,24 @@ void I_InitGamepad(void)
|
||||
|
||||
if (joy_device > 0)
|
||||
{
|
||||
if (SDL_IsGameController(joy_device - 1))
|
||||
const int num_joysticks = NumJoysticks();
|
||||
|
||||
if (num_joysticks && SDL_IsGameController(joy_device - 1))
|
||||
{
|
||||
I_OpenGamepad(joy_device - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
joy_device = 1;
|
||||
MN_UpdateAllGamepadItems();
|
||||
|
||||
if (num_joysticks && SDL_IsGameController(0))
|
||||
{
|
||||
I_OpenGamepad(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
MN_UpdateAllGamepadItems();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user