mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Show the error dialog before creating the SDL window
This commit is contained in:
parent
eb044e13ca
commit
fcb6f00a7f
@ -625,6 +625,12 @@ DoInit (int argc, char * argv[], bool & exit)
|
|||||||
|
|
||||||
bOK = ReadConfig (); // lit le fichier config.json
|
bOK = ReadConfig (); // lit le fichier config.json
|
||||||
|
|
||||||
|
if (!bOK) // Something wrong with config.json file?
|
||||||
|
{
|
||||||
|
InitFail ("Game not correctly installed");
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
auto res = SDL_Init (SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER);
|
auto res = SDL_Init (SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER);
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
@ -655,12 +661,6 @@ DoInit (int argc, char * argv[], bool & exit)
|
|||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!bOK) // Something wrong with config.json file?
|
|
||||||
{
|
|
||||||
InitFail ("Game not correctly installed");
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
SDL_RenderSetLogicalSize (g_renderer, LXIMAGE, LYIMAGE);
|
SDL_RenderSetLogicalSize (g_renderer, LXIMAGE, LYIMAGE);
|
||||||
|
|
||||||
const auto renders = SDL_GetNumRenderDrivers ();
|
const auto renders = SDL_GetNumRenderDrivers ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user