mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-01-19 07:51:03 +00:00
Port the client to the new restart API.
This fixes the video menu and alt-tab when running a renderer that uses the new API.
This commit is contained in:
parent
a5102f47dd
commit
27a021eb7c
2 changed files with 10 additions and 6 deletions
|
@ -1231,12 +1231,12 @@ Key_Event(int key, qboolean down, qboolean special)
|
|||
if (!fullscreen->value)
|
||||
{
|
||||
Cvar_Set("vid_fullscreen", "1");
|
||||
fullscreen->modified = true;
|
||||
Cbuf_AddText("vid_restart\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
Cvar_Set("vid_fullscreen", "0");
|
||||
fullscreen->modified = true;
|
||||
Cbuf_AddText("vid_restart\n");
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
@ -190,19 +190,19 @@ ApplyChanges(void *unused)
|
|||
if (!strcmp(s_mode_list.itemnames[s_mode_list.curvalue],
|
||||
AUTO_MODE_NAME))
|
||||
{
|
||||
/* Restarts automatically */
|
||||
Cvar_SetValue("r_mode", -2);
|
||||
restart = true;
|
||||
}
|
||||
else if (!strcmp(s_mode_list.itemnames[s_mode_list.curvalue],
|
||||
CUSTOM_MODE_NAME))
|
||||
{
|
||||
/* Restarts automatically */
|
||||
Cvar_SetValue("r_mode", -1);
|
||||
restart = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Restarts automatically */
|
||||
Cvar_SetValue("r_mode", s_mode_list.curvalue);
|
||||
restart = true;
|
||||
}
|
||||
|
||||
if (s_display_list.curvalue != GLimp_GetWindowDisplayIndex() )
|
||||
|
@ -229,7 +229,11 @@ ApplyChanges(void *unused)
|
|||
}
|
||||
|
||||
/* Restarts automatically */
|
||||
if (vid_fullscreen->value != s_fs_box.curvalue)
|
||||
{
|
||||
Cvar_SetValue("vid_fullscreen", s_fs_box.curvalue);
|
||||
restart = true;
|
||||
}
|
||||
|
||||
if (s_fs_box.curvalue == 2)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue