mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 12:41:21 +00:00
Restart the refresher when certain values are changed via the menu
This commit is contained in:
parent
f1420ffe75
commit
de9dda7432
1 changed files with 24 additions and 3 deletions
|
@ -81,21 +81,42 @@ ResetDefaults(void *unused)
|
|||
static void
|
||||
ApplyChanges(void *unused)
|
||||
{
|
||||
Cvar_SetValue("gl_picmip", 3 - s_tq_slider.curvalue);
|
||||
qboolean restart = false;
|
||||
|
||||
if (gl_picmip->value != (3 - s_tq_slider.curvalue))
|
||||
{
|
||||
|
||||
Cvar_SetValue("gl_picmip", 3 - s_tq_slider.curvalue);
|
||||
restart = true;
|
||||
}
|
||||
|
||||
if (gl_ext_palettedtexture->value != s_paletted_texture_box.curvalue)
|
||||
{
|
||||
Cvar_SetValue("gl_ext_palettedtexture", s_paletted_texture_box.curvalue);
|
||||
restart = true;
|
||||
}
|
||||
|
||||
/* Restarts automatically */
|
||||
Cvar_SetValue("vid_fullscreen", s_fs_box.curvalue);
|
||||
Cvar_SetValue("gl_ext_palettedtexture", s_paletted_texture_box.curvalue);
|
||||
|
||||
/* custom mode */
|
||||
if (s_mode_list.curvalue != CUSTOM_MODE)
|
||||
{
|
||||
/* Restarts automatically */
|
||||
Cvar_SetValue("gl_mode", s_mode_list.curvalue);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Restarts automatically */
|
||||
Cvar_SetValue("gl_mode", -1);
|
||||
}
|
||||
|
||||
M_ForceMenuOff();
|
||||
if (restart)
|
||||
{
|
||||
Cbuf_AddText("vid_restart\n");
|
||||
}
|
||||
|
||||
//M_ForceMenuOff();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue