sdl: Make our error checking for SDL_Init(SubSystem) consistent with the SDL wiki/test programs.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1126 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Sander van Dijk 2014-10-18 16:33:01 +00:00
parent ce78a2ea51
commit bc30c6278c
5 changed files with 7 additions and 5 deletions

View File

@ -504,7 +504,7 @@ int CDAudio_Init(void)
export_cddev_arg(); export_cddev_arg();
if (SDL_InitSubSystem(SDL_INIT_CDROM) == -1) if (SDL_InitSubSystem(SDL_INIT_CDROM) < 0)
{ {
Con_Printf("Couldn't init SDL cdrom: %s\n", SDL_GetError()); Con_Printf("Couldn't init SDL cdrom: %s\n", SDL_GetError());
return -1; return -1;

View File

@ -1304,8 +1304,8 @@ void VID_Init (void)
putenv (vid_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) < 0)
Sys_Error("Could not initialize SDL Video"); Sys_Error("Couldn't init SDL video: %s", SDL_GetError());
#if defined(USE_SDL2) #if defined(USE_SDL2)
{ {

View File

@ -82,7 +82,7 @@ static void Sys_InitSDL (void)
if (SDL_Init(0) < 0) if (SDL_Init(0) < 0)
{ {
Sys_Error("SDL failed to initialize."); Sys_Error("Couldn't init SDL: %s", SDL_GetError());
} }
atexit(Sys_AtExit); atexit(Sys_AtExit);
} }

View File

@ -84,7 +84,7 @@ qboolean SNDDMA_Init (dma_t *dma)
int tmp, val; int tmp, val;
char drivername[128]; char drivername[128];
if (SDL_InitSubSystem(SDL_INIT_AUDIO) == -1) if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0)
{ {
Con_Printf("Couldn't init SDL audio: %s\n", SDL_GetError()); Con_Printf("Couldn't init SDL audio: %s\n", SDL_GetError());
return false; return false;

View File

@ -1 +1,3 @@
#include <winuser.h>
icon ICON "QuakeSpasm.ico" icon ICON "QuakeSpasm.ico"
1 RT_MANIFEST "QuakeSpasm.manifest"