Merge pull request #1834 from Areloch/SDLSplashImageFixes2

Also adds a sanity check in the event a splash image isn't found.
This commit is contained in:
Areloch 2016-11-27 16:31:26 -06:00 committed by GitHub
commit 7af95e6a8e

View file

@ -39,6 +39,8 @@ bool Platform::displaySplashWindow( String path )
gSplashImage = SDL_LoadBMP(path); gSplashImage = SDL_LoadBMP(path);
//now the pop-up window //now the pop-up window
if (gSplashImage)
{
gSplashWindow = SDL_CreateWindow("", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, gSplashWindow = SDL_CreateWindow("", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
gSplashImage->w, gSplashImage->h, SDL_WINDOW_BORDERLESS | SDL_WINDOW_SHOWN); gSplashImage->w, gSplashImage->h, SDL_WINDOW_BORDERLESS | SDL_WINDOW_SHOWN);
@ -49,6 +51,7 @@ bool Platform::displaySplashWindow( String path )
SDL_RenderCopy(gSplashRenderer, gSplashTexture, NULL, NULL); SDL_RenderCopy(gSplashRenderer, gSplashTexture, NULL, NULL);
SDL_RenderPresent(gSplashRenderer); SDL_RenderPresent(gSplashRenderer);
}
return true; return true;
} }