mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 20:31:30 +00:00
Fix up controller menu support
This commit is contained in:
parent
b1c41a193b
commit
0f11116e7b
1 changed files with 11 additions and 10 deletions
21
src/m_menu.c
21
src/m_menu.c
|
@ -160,7 +160,7 @@ typedef enum
|
|||
levellist_mode_t levellistmode = LLM_CREATESERVER;
|
||||
UINT8 maplistoption = 0;
|
||||
|
||||
static char joystickInfo[8][25];
|
||||
static char joystickInfo[8][29];
|
||||
#ifndef NONET
|
||||
static UINT32 serverlistpage;
|
||||
#endif
|
||||
|
@ -6711,37 +6711,38 @@ static void M_DrawJoystick(void)
|
|||
|
||||
M_DrawGenericMenu();
|
||||
|
||||
for (i = 0;i < 8; i++)
|
||||
for (i = 0;i < 7; i++)
|
||||
{
|
||||
M_DrawSaveLoadBorder(OP_JoystickSetDef.x, OP_JoystickSetDef.y+LINEHEIGHT*i);
|
||||
M_DrawTextBox(OP_JoystickSetDef.x-8, OP_JoystickSetDef.y+LINEHEIGHT*i-12, 28, 1);
|
||||
//M_DrawSaveLoadBorder(OP_JoystickSetDef.x, OP_JoystickSetDef.y+LINEHEIGHT*i);
|
||||
|
||||
if ((setupcontrols_secondaryplayer && (i == cv_usejoystick2.value))
|
||||
|| (!setupcontrols_secondaryplayer && (i == cv_usejoystick.value)))
|
||||
V_DrawString(OP_JoystickSetDef.x, OP_JoystickSetDef.y+LINEHEIGHT*i,V_GREENMAP,joystickInfo[i]);
|
||||
V_DrawString(OP_JoystickSetDef.x, OP_JoystickSetDef.y+LINEHEIGHT*i-4,V_GREENMAP,joystickInfo[i]);
|
||||
else
|
||||
V_DrawString(OP_JoystickSetDef.x, OP_JoystickSetDef.y+LINEHEIGHT*i,0,joystickInfo[i]);
|
||||
V_DrawString(OP_JoystickSetDef.x, OP_JoystickSetDef.y+LINEHEIGHT*i-4,0,joystickInfo[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static void M_SetupJoystickMenu(INT32 choice)
|
||||
{
|
||||
INT32 i = 0;
|
||||
const char *joyname = "None";
|
||||
const char *joyNA = "Unavailable";
|
||||
INT32 n = I_NumJoys();
|
||||
(void)choice;
|
||||
|
||||
strcpy(joystickInfo[i], joyname);
|
||||
strncpy(joystickInfo[i], "None", 5);
|
||||
|
||||
for (i = 1; i < 8; i++)
|
||||
{
|
||||
if (i <= n && (joyname = I_GetJoyName(i)) != NULL)
|
||||
if (i <= n && (I_GetJoyName(i)) != NULL)
|
||||
{
|
||||
strncpy(joystickInfo[i], joyname, 24);
|
||||
joystickInfo[i][24] = '\0';
|
||||
strncpy(joystickInfo[i], I_GetJoyName(i), 28);
|
||||
CONS_Printf("%s\n", joystickInfo[i]);
|
||||
}
|
||||
else
|
||||
strcpy(joystickInfo[i], joyNA);
|
||||
CONS_Printf("%s\n", joystickInfo[i]);
|
||||
}
|
||||
|
||||
M_SetupNextMenu(&OP_JoystickSetDef);
|
||||
|
|
Loading…
Reference in a new issue