X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsdl.c;h=a4fbf7dee3d12997c9cc817a21b40507b755d1b9;hb=d2098db6b7b0cee3b43e341c012beec5bc6ef6bd;hp=7c38aa940d26fa1c45f5fc9639a9ca1fd7b17306;hpb=2ae6ae8ed951e87fcba7c363705cd6ddea8de91c;p=rocksndiamonds.git diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index 7c38aa94..a4fbf7de 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -24,8 +24,8 @@ inline void SDLInitVideoDisplay(void) { /* initialize SDL video */ - if (SDL_Init(SDL_INIT_VIDEO) < 0) - Error(ERR_EXIT, "SDL_Init() failed: %s", SDL_GetError()); + if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) + Error(ERR_EXIT, "SDL_InitSubSystem() failed: %s", SDL_GetError()); /* set default SDL depth */ video.default_depth = SDL_GetVideoInfo()->vfmt->BitsPerPixel; @@ -707,9 +707,9 @@ Bitmap *SDLLoadImage(char *filename) inline boolean SDLOpenAudio(void) { - if (SDL_Init(SDL_INIT_AUDIO) < 0) + if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0) { - Error(ERR_WARN, "SDL_Init() failed: %s", SDL_GetError()); + Error(ERR_WARN, "SDL_InitSubSystem() failed: %s", SDL_GetError()); return FALSE; }