diff --git a/Quake/gl_vidsdl.c b/Quake/gl_vidsdl.c index ac309a73..c8b208a1 100644 --- a/Quake/gl_vidsdl.c +++ b/Quake/gl_vidsdl.c @@ -879,7 +879,6 @@ VID_Init */ void VID_Init (void) { - static char vid_center[] = "SDL_VIDEO_CENTERED=center"; const SDL_VideoInfo *info; int width, height, bpp; qboolean fullscreen; @@ -907,12 +906,13 @@ void VID_Init (void) Cmd_AddCommand ("vid_describecurrentmode", VID_DescribeCurrentMode_f); Cmd_AddCommand ("vid_describemodes", VID_DescribeModes_f); + putenv ("SDL_VIDEO_CENTERED=center"); /* SDL_putenv is problematic in versions <= 1.2.9 */ + if (SDL_InitSubSystem(SDL_INIT_VIDEO) == -1) Sys_Error("Could not initialize SDL Video"); info = SDL_GetVideoInfo(); - - putenv (vid_center); /* SDL_putenv is problematic in versions <= 1.2.9 */ + Cvar_SetValueQuick (&vid_bpp, (float)info->vfmt->BitsPerPixel); if (CFG_OpenConfig("config.cfg") == 0) {