Add a billion debug prints

This commit is contained in:
Sally Coolatta 2022-08-30 06:26:35 -04:00
parent 1af1b9bd1c
commit c77f9fa558
2 changed files with 16 additions and 10 deletions

View file

@ -2099,12 +2099,12 @@ void M_CharacterSelectInit(void)
{
// Un-set devices for other players.
if (i != 0 || optionsmenu.profile)
{
CV_SetValue(&cv_usejoystick[i], -1);
//CONS_Printf("Device for %d set to %d\n", i, -1);
CONS_Printf("M_CharacterSelectInit: Device for %d set to %d\n", i, -1);
}
}
}
//CONS_Printf("========\n");
memset(setup_chargrid, -1, sizeof(setup_chargrid));
for (i = 0; i < 9; i++)
@ -2329,16 +2329,14 @@ static boolean M_HandlePressStart(setup_player_t *p, UINT8 num)
CV_SetValue(&cv_usejoystick[num], i);
//CONS_Printf("Device for %d set to %d\n", num, i);
//CONS_Printf("========\n");
CONS_Printf("M_HandlePressStart: Device for %d set to %d\n", num, i);
for (j = num+1; j < MAXSPLITSCREENPLAYERS; j++)
{
// Un-set devices for other players.
CV_SetValue(&cv_usejoystick[j], -1);
//CONS_Printf("Device for %d set to %d\n", j, -1);
CONS_Printf("M_HandlePressStart: Device for %d set to %d\n", j, -1);
}
//CONS_Printf("========\n");
//setup_numplayers++;
p->mdepth = CSSTEP_PROFILE;
@ -2407,6 +2405,7 @@ static boolean M_HandleCSelectProfile(setup_player_t *p, UINT8 num)
if (num > 0)
{
CV_StealthSetValue(&cv_usejoystick[num], -1);
CONS_Printf("M_HandleCSelectProfile: Device for %d set to %d\n", num, -1);
}
return true;
@ -5015,7 +5014,8 @@ void M_HandleVideoModes(INT32 ch)
// sets whatever device has had its key pressed to the active device.
// 20/05/22: Commented out for now but not deleted as it might still find some use in the future?
/*static void SetDeviceOnPress(void)
/*
static void SetDeviceOnPress(void)
{
UINT8 i;
@ -5024,11 +5024,12 @@ void M_HandleVideoModes(INT32 ch)
if (deviceResponding[i])
{
CV_SetValue(&cv_usejoystick[0], i); // Force-set this joystick as the current joystick we're using for P1 (which is the only one controlling menus)
//CONS_Printf("Using device %d for mappings\n", i);
CONS_Printf("SetDeviceOnPress: Device for %d set to %d\n", 0, i);
return;
}
}
}*/
}
*/
// Prompt a device selection window (just tap any button on the device you want)

View file

@ -1013,6 +1013,7 @@ void I_UpdateJoystickDeviceIndex(UINT8 player)
if (JoyInfo[player].dev)
{
cv_usejoystick[player].value = I_GetJoystickDeviceIndex(JoyInfo[player].dev) + 1;
CONS_Printf("I_UpdateJoystickDeviceIndex: Device for %d set to %d\n", player, cv_usejoystick[player].value);
}
else
{
@ -1036,6 +1037,7 @@ void I_UpdateJoystickDeviceIndex(UINT8 player)
{
// We DID make it through the whole loop, so we can use this one!
cv_usejoystick[player].value = value;
CONS_Printf("I_UpdateJoystickDeviceIndex: Device for %d set to %d\n", player, cv_usejoystick[player].value);
break;
}
}
@ -1045,6 +1047,7 @@ void I_UpdateJoystickDeviceIndex(UINT8 player)
// We DID NOT make it through the whole loop, so we can't assign this joystick to anything.
// When you try your best, but you don't succeed...
cv_usejoystick[player].value = 0;
CONS_Printf("I_UpdateJoystickDeviceIndex: Device for %d set to %d\n", player, 0);
}
}
}
@ -1235,6 +1238,7 @@ void I_InitJoystick(UINT8 index)
if (newcontroller && i < MAXSPLITSCREENPLAYERS) // don't override an active device
{
cv_usejoystick[index].value = I_GetJoystickDeviceIndex(JoyInfo[index].dev) + 1;
CONS_Printf("I_InitJoystick: Device for %d set to %d\n", index, cv_usejoystick[index].value);
}
else if (newcontroller && joy_open(index, cv_usejoystick[index].value) != -1)
{
@ -1248,6 +1252,7 @@ void I_InitJoystick(UINT8 index)
if (JoyInfo[index].oldjoy)
I_ShutdownJoystick(index);
cv_usejoystick[index].value = 0;
CONS_Printf("I_InitJoystick: Device for %d set to %d\n", index, cv_usejoystick[index].value);
joystick_started[index] = 0;
}