mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-05-31 01:00:53 +00:00
Fixes to the options menu, including several segfaults and a cursor problem.
This commit is contained in:
parent
116daa40e9
commit
549ceb75d4
1 changed files with 26 additions and 25 deletions
|
@ -542,9 +542,11 @@ void M_AdjustSliders (int dir)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 15: // _windowed_mouse
|
case 15: // _windowed_mouse
|
||||||
|
if (_windowed_mouse) {
|
||||||
/* Cvar_SetValue ("_windowed_mouse", !_windowed_mouse.value);
|
/* Cvar_SetValue ("_windowed_mouse", !_windowed_mouse.value);
|
||||||
CVAR_FIXME */
|
CVAR_FIXME */
|
||||||
Cvar_SetValue (_windowed_mouse, !_windowed_mouse->value);
|
Cvar_SetValue (_windowed_mouse, !_windowed_mouse->value);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -659,10 +661,12 @@ void M_Options_Draw (void)
|
||||||
if (modestate == MS_WINDOWED)
|
if (modestate == MS_WINDOWED)
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
M_Print (16, 152, " Use Mouse");
|
if (_windowed_mouse) {
|
||||||
/* M_DrawCheckbox (220, 152, _windowed_mouse.value);
|
M_Print (16, 152, " Use Mouse");
|
||||||
|
/* M_DrawCheckbox (220, 152, _windowed_mouse.value);
|
||||||
CVAR_FIXME */
|
CVAR_FIXME */
|
||||||
M_DrawCheckbox (220, 152, _windowed_mouse->value);
|
M_DrawCheckbox (220, 152, _windowed_mouse->value);
|
||||||
|
}
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -695,7 +699,8 @@ void M_Options_Key (int k)
|
||||||
Cbuf_AddText ("exec default.cfg\n");
|
Cbuf_AddText ("exec default.cfg\n");
|
||||||
break;
|
break;
|
||||||
case 14:
|
case 14:
|
||||||
M_Menu_Video_f ();
|
if (vid_menudrawfn)
|
||||||
|
M_Menu_Video_f ();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
M_AdjustSliders (1);
|
M_AdjustSliders (1);
|
||||||
|
@ -708,11 +713,27 @@ void M_Options_Key (int k)
|
||||||
options_cursor--;
|
options_cursor--;
|
||||||
if (options_cursor < 0)
|
if (options_cursor < 0)
|
||||||
options_cursor = OPTIONS_ITEMS-1;
|
options_cursor = OPTIONS_ITEMS-1;
|
||||||
|
if (options_cursor == 15 && (!(_windowed_mouse)
|
||||||
|
#ifdef _WIN32
|
||||||
|
|| (modestate != MS_WINDOWED)
|
||||||
|
#endif
|
||||||
|
)) // bleh
|
||||||
|
options_cursor--;
|
||||||
|
if (options_cursor == 14 && !(vid_menudrawfn))
|
||||||
|
options_cursor--;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case K_DOWNARROW:
|
case K_DOWNARROW:
|
||||||
S_LocalSound ("misc/menu1.wav");
|
S_LocalSound ("misc/menu1.wav");
|
||||||
options_cursor++;
|
options_cursor++;
|
||||||
|
if (options_cursor == 14 && !(vid_menudrawfn))
|
||||||
|
options_cursor++;
|
||||||
|
if (options_cursor == 15 && (!(_windowed_mouse)
|
||||||
|
#ifdef _WIN32
|
||||||
|
|| (modestate != MS_WINDOWED)
|
||||||
|
#endif
|
||||||
|
)) // ARGH!!!!!
|
||||||
|
options_cursor++;
|
||||||
if (options_cursor >= OPTIONS_ITEMS)
|
if (options_cursor >= OPTIONS_ITEMS)
|
||||||
options_cursor = 0;
|
options_cursor = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -725,26 +746,6 @@ void M_Options_Key (int k)
|
||||||
M_AdjustSliders (1);
|
M_AdjustSliders (1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options_cursor == 14 && vid_menudrawfn == NULL)
|
|
||||||
{
|
|
||||||
if (k == K_UPARROW)
|
|
||||||
options_cursor = 13;
|
|
||||||
else
|
|
||||||
options_cursor = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((options_cursor == 15)
|
|
||||||
#ifdef _WIN32
|
|
||||||
&& (modestate != MS_WINDOWED)
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (k == K_UPARROW)
|
|
||||||
options_cursor = 14;
|
|
||||||
else
|
|
||||||
options_cursor = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue