Force 16 bpp drawing.

Actually exit if SDL can't be initialized.
This commit is contained in:
theoddone33
2002-03-02 19:28:43 +00:00
parent f2d544b67e
commit 0c848d2ea8

View File

@@ -37,7 +37,7 @@ static DWORD FullScreen = 0;
static int sdl_inited = 0; static int sdl_inited = 0;
static int UseOpenGL = 0; static int UseOpenGL = 0;
extern unsigned char cvidmode; extern unsigned char cvidmode;
DWORD BitDepth = 0; // Do NOT change this for ANY reason! DWORD BitDepth = 16;
// JOYSTICK AND KEYBOARD INPUT // JOYSTICK AND KEYBOARD INPUT
SDL_Joystick *JoystickInput[5]; SDL_Joystick *JoystickInput[5];
//DWORD CurrentJoy = 0; //DWORD CurrentJoy = 0;
@@ -580,8 +580,6 @@ int startgame(void)
sdl_inited = -1; sdl_inited = -1;
} }
BitDepth = (UseOpenGL ? 16 : 0);
if (sdl_inited == 1) sw_end(); if (sdl_inited == 1) sw_end();
#ifdef __OPENGL__ #ifdef __OPENGL__
else if (sdl_inited == 2) gl_end(); else if (sdl_inited == 2) gl_end();
@@ -756,7 +754,7 @@ void initwinvideo(void)
if (startgame() != TRUE) if (startgame() != TRUE)
{ {
return; LinuxExit ();
} }
if (newmode == 1) if (newmode == 1)