Reset vid_rate when using fallback display mode

This commit is contained in:
Daniel Gibson 2019-07-06 19:42:31 +02:00
parent 6db1203f22
commit b9d8ceba0b
3 changed files with 3 additions and 1 deletions

View file

@ -264,6 +264,7 @@ VID_MenuInit(void)
0 0
}; };
// must be kept in sync with vid_modes[] in vid.c
static const char *resolutions[] = { static const char *resolutions[] = {
"[320 240 ]", "[320 240 ]",
"[400 300 ]", "[400 300 ]",

View file

@ -531,6 +531,7 @@ GLimp_InitGraphics(int fullscreen, int *pwidth, int *pheight)
/* Try to recover */ /* Try to recover */
Cvar_SetValue("r_mode", 4); Cvar_SetValue("r_mode", 4);
Cvar_SetValue("vid_fullscreen", 0); Cvar_SetValue("vid_fullscreen", 0);
Cvar_SetValue("vid_rate", -1);
fullscreen = 0; fullscreen = 0;
*pwidth = width = 640; *pwidth = width = 640;

View file

@ -206,7 +206,7 @@ typedef struct vidmode_s
int mode; int mode;
} vidmode_t; } vidmode_t;
// This must be the same as in videomenu.c! // This must be the same as VID_MenuInit()->resolutions[] in videomenu.c!
vidmode_t vid_modes[] = { vidmode_t vid_modes[] = {
{"Mode 0: 320x240", 320, 240, 0}, {"Mode 0: 320x240", 320, 240, 0},
{"Mode 1: 400x300", 400, 300, 1}, {"Mode 1: 400x300", 400, 300, 1},