mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
Also adds a sanity check in the event a splash image isn't found.
This commit is contained in:
parent
6cad7b6248
commit
5fbc24d9e2
1 changed files with 9 additions and 6 deletions
|
|
@ -39,16 +39,19 @@ bool Platform::displaySplashWindow( String path )
|
|||
gSplashImage = SDL_LoadBMP(path);
|
||||
|
||||
//now the pop-up window
|
||||
gSplashWindow = SDL_CreateWindow("", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
|
||||
gSplashImage->w, gSplashImage->h, SDL_WINDOW_BORDERLESS | SDL_WINDOW_SHOWN);
|
||||
if (gSplashImage)
|
||||
{
|
||||
gSplashWindow = SDL_CreateWindow("", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
|
||||
gSplashImage->w, gSplashImage->h, SDL_WINDOW_BORDERLESS | SDL_WINDOW_SHOWN);
|
||||
|
||||
gSplashRenderer = SDL_CreateRenderer(gSplashWindow, -1, SDL_RENDERER_ACCELERATED);
|
||||
gSplashRenderer = SDL_CreateRenderer(gSplashWindow, -1, SDL_RENDERER_ACCELERATED);
|
||||
|
||||
gSplashTexture = SDL_CreateTextureFromSurface(gSplashRenderer, gSplashImage);
|
||||
gSplashTexture = SDL_CreateTextureFromSurface(gSplashRenderer, gSplashImage);
|
||||
|
||||
SDL_RenderCopy(gSplashRenderer, gSplashTexture, NULL, NULL);
|
||||
SDL_RenderCopy(gSplashRenderer, gSplashTexture, NULL, NULL);
|
||||
|
||||
SDL_RenderPresent(gSplashRenderer);
|
||||
SDL_RenderPresent(gSplashRenderer);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue