gl_vidsdl.c: make bpp default to current bpp

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@821 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Sander van Dijk 2013-02-24 16:28:28 +00:00
parent 7ae0a9e7f2
commit a6b83f69ce

View file

@ -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)
{