mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-03-13 06:13:39 +00:00
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:
parent
9f60c1d0f8
commit
cdfcaefb32
1 changed files with 2 additions and 1 deletions
|
@ -879,6 +879,7 @@ VID_Init
|
||||||
*/
|
*/
|
||||||
void VID_Init (void)
|
void VID_Init (void)
|
||||||
{
|
{
|
||||||
|
static char vid_center[32] = "SDL_VIDEO_CENTERED=center";
|
||||||
const SDL_VideoInfo *info;
|
const SDL_VideoInfo *info;
|
||||||
int width, height, bpp;
|
int width, height, bpp;
|
||||||
qboolean fullscreen;
|
qboolean fullscreen;
|
||||||
|
@ -906,7 +907,7 @@ void VID_Init (void)
|
||||||
Cmd_AddCommand ("vid_describecurrentmode", VID_DescribeCurrentMode_f);
|
Cmd_AddCommand ("vid_describecurrentmode", VID_DescribeCurrentMode_f);
|
||||||
Cmd_AddCommand ("vid_describemodes", VID_DescribeModes_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)
|
if (SDL_InitSubSystem(SDL_INIT_VIDEO) == -1)
|
||||||
Sys_Error("Could not initialize SDL Video");
|
Sys_Error("Could not initialize SDL Video");
|
||||||
|
|
Loading…
Reference in a new issue