joy_open: make debug prints actually print the player number

This commit is contained in:
Alug committed 2026-01-21 19:53:49 +01:00
1 parent 287bb2bf13
commit cbf4de0a29
1 file changed
+6 -6
+6 -6
View File
@@ -893,13 +893,13 @@ static int joy_open(int playerIndex, int joyIndex)
if (SDL_WasInit(SDL_INIT_JOYSTICK) == 0)
{
CONS_Printf(M_GetText("Joystick subsystem not started\n"));
CONS_Printf("Joystick subsystem not started\n");
return -1;
}
if (SDL_WasInit(SDL_INIT_GAMECONTROLLER) == 0)
{
CONS_Printf(M_GetText("Game Controller subsystem not started\n"));
CONS_Printf("Game Controller subsystem not started\n");
return -1;
}
@@ -910,7 +910,7 @@ static int joy_open(int playerIndex, int joyIndex)
if (num_joy == 0)
{
CONS_Printf("%s", M_GetText("Found no joysticks on this system\n"));
CONS_Printf("%s", "Found no joysticks on this system\n");
return -1;
}
@@ -933,7 +933,7 @@ static int joy_open(int playerIndex, int joyIndex)
return SDL_CONTROLLER_AXIS_MAX;
// Else, we're changing devices, so send neutral joy events
CONS_Debug(DBG_GAMELOGIC, "Joystick1 device is changing; resetting events...\n");
CONS_Debug(DBG_GAMELOGIC, "Joystick %d device is changing; resetting events...\n", playerIndex+1);
I_ShutdownJoystick(playerIndex);
}
@@ -941,11 +941,11 @@ static int joy_open(int playerIndex, int joyIndex)
if (JoyInfo[playerIndex].dev == NULL)
{
CONS_Debug(DBG_GAMELOGIC, M_GetText("Joystick1: Couldn't open device - %s\n"), SDL_GetError());
CONS_Debug(DBG_GAMELOGIC, "Joystick %d: Couldn't open device - %s\n", playerIndex+1, SDL_GetError());
return -1;
}
CONS_Debug(DBG_GAMELOGIC, M_GetText("Joystick1: %s\n"), SDL_GameControllerName(JoyInfo[playerIndex].dev));
CONS_Debug(DBG_GAMELOGIC, "Joystick %d: %s\n", playerIndex+1, SDL_GameControllerName(JoyInfo[playerIndex].dev));
JoyInfo[playerIndex].id = I_GetJoystickDeviceIndex(JoyInfo[playerIndex].dev);