gl_vidsdl.c: fix an initialization oops

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@820 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Sander van Dijk 2013-02-24 13:46:19 +00:00
parent 8dfabe4e7f
commit 7ae0a9e7f2

View file

@ -880,7 +880,7 @@ VID_Init
void VID_Init (void)
{
static char vid_center[] = "SDL_VIDEO_CENTERED=center";
const SDL_VideoInfo *info = SDL_GetVideoInfo();
const SDL_VideoInfo *info;
int width, height, bpp;
qboolean fullscreen;
const char *read_vars[] = { "vid_fullscreen",
@ -910,6 +910,8 @@ void VID_Init (void)
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 */
if (CFG_OpenConfig("config.cfg") == 0)