mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
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:
parent
ce78a2ea51
commit
bc30c6278c
5 changed files with 7 additions and 5 deletions
|
@ -504,7 +504,7 @@ int CDAudio_Init(void)
|
|||
|
||||
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());
|
||||
return -1;
|
||||
|
|
|
@ -1304,8 +1304,8 @@ void VID_Init (void)
|
|||
|
||||
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");
|
||||
if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0)
|
||||
Sys_Error("Couldn't init SDL video: %s", SDL_GetError());
|
||||
|
||||
#if defined(USE_SDL2)
|
||||
{
|
||||
|
|
|
@ -82,7 +82,7 @@ static void Sys_InitSDL (void)
|
|||
|
||||
if (SDL_Init(0) < 0)
|
||||
{
|
||||
Sys_Error("SDL failed to initialize.");
|
||||
Sys_Error("Couldn't init SDL: %s", SDL_GetError());
|
||||
}
|
||||
atexit(Sys_AtExit);
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ qboolean SNDDMA_Init (dma_t *dma)
|
|||
int tmp, val;
|
||||
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());
|
||||
return false;
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
#include <winuser.h>
|
||||
icon ICON "QuakeSpasm.ico"
|
||||
1 RT_MANIFEST "QuakeSpasm.manifest"
|
||||
|
|
Loading…
Reference in a new issue