diff --git a/src/blupi.cxx b/src/blupi.cxx index a859e14..8063fff 100644 --- a/src/blupi.cxx +++ b/src/blupi.cxx @@ -625,6 +625,12 @@ DoInit (int argc, char * argv[], bool & exit) 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); if (res < 0) return EXIT_FAILURE; @@ -655,12 +661,6 @@ DoInit (int argc, char * argv[], bool & exit) 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); const auto renders = SDL_GetNumRenderDrivers ();