just pass the controller directly
simplifies this alot
This commit is contained in:
1 parent
3f3df9346f
commit
b14d1f1e0b
1 file changed
+2
-12
+2
-12
@@ -1496,12 +1496,7 @@ void I_GamepadRumble(INT32 playernum, UINT16 low_strength, UINT16 high_strength,
|
||||
(void)high_strength;
|
||||
(void)duration;
|
||||
#else
|
||||
|
||||
INT32 device_id = I_GetJoystickDeviceIndex(JoyInfo[playernum].dev);
|
||||
|
||||
I_Assert(device_id > 0); // Gamepad devices are always ID 1 or higher
|
||||
|
||||
SDL_GameController *controller = SDL_GameControllerFromInstanceID(device_id);
|
||||
SDL_GameController *controller = JoyInfo[playernum].dev;
|
||||
if (controller == NULL)
|
||||
{
|
||||
return;
|
||||
@@ -1519,12 +1514,7 @@ void I_SetGamepadIndicatorColor(INT32 playernum, UINT8 red, UINT8 green, UINT8 b
|
||||
(void)green;
|
||||
(void)blue;
|
||||
#else
|
||||
|
||||
INT32 device_id = I_GetJoystickDeviceIndex(JoyInfo[playernum].dev);
|
||||
|
||||
I_Assert(device_id > 0); // Gamepad devices are always ID 1 or higher
|
||||
|
||||
SDL_GameController *controller = SDL_GameControllerFromInstanceID(device_id);
|
||||
SDL_GameController *controller = JoyInfo[playernum].dev;
|
||||
if (controller == NULL)
|
||||
{
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user