fix -sdl32 crashing on startup (vid_bitdepth init got lost)

This commit is contained in:
Bill Currie 2002-08-26 22:43:34 +00:00
parent 0ff949fdef
commit 7f5c99efdc
3 changed files with 5 additions and 2 deletions

View file

@ -43,6 +43,7 @@ extern struct cvar_s *vid_fullscreen;
extern struct cvar_s *vid_system_gamma;
extern struct cvar_s *vid_width;
extern struct cvar_s *vid_height;
extern struct cvar_s *vid_bitdepth;
typedef struct vrect_s {
int x,y,width,height;

View file

@ -19,6 +19,8 @@ static const char rcsid[] =
#include "QF/va.h"
#include "QF/vid.h"
cvar_t *vid_bitdepth;
extern SDL_Surface *screen;
@ -77,4 +79,6 @@ VID_Init_Cvars ()
"Toggles fullscreen mode");
vid_system_gamma = Cvar_Get ("vid_system_gamma", "1", CVAR_ARCHIVE, NULL,
"Use system gamma control if available");
vid_bitdepth = Cvar_Get ("vid_bitdepth", "8", CVAR_ROM, NULL, "Sets "
"display bitdepth (supported modes: 8 16 32)");
}

View file

@ -55,8 +55,6 @@ static const char rcsid[] =
HWND mainwindow;
#endif
cvar_t *vid_bitdepth;
// The original defaults
#define BASEWIDTH 320
#define BASEHEIGHT 200