putenv () may conform to different standards, therefore keep the vid_center[]

static char array in VID_Init ().

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@822 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2013-02-24 17:15:04 +00:00
parent 9f60c1d0f8
commit cdfcaefb32

View file

@ -879,6 +879,7 @@ VID_Init
*/
void VID_Init (void)
{
static char vid_center[32] = "SDL_VIDEO_CENTERED=center";
const SDL_VideoInfo *info;
int width, height, bpp;
qboolean fullscreen;
@ -906,7 +907,7 @@ 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 */
putenv (vid_center); /* SDL_putenv is problematic in versions <= 1.2.9 */
if (SDL_InitSubSystem(SDL_INIT_VIDEO) == -1)
Sys_Error("Could not initialize SDL Video");