GUI: check SDL_Init status

This commit is contained in:
tildearrow 2023-06-02 14:11:47 -05:00
parent 8c10c7ed5d
commit b56be59344

View file

@ -6021,7 +6021,14 @@ bool FurnaceGUI::init() {
#endif
// initialize SDL
SDL_Init(SDL_INIT_VIDEO|SDL_INIT_HAPTIC);
if (SDL_Init(SDL_INIT_VIDEO)!=0) {
logE("could not initialize video! %s",SDL_GetError());
return false;
}
if (SDL_Init(SDL_INIT_HAPTIC)!=0) {
logW("could not initialize haptic! %s",SDL_GetError());
}
const char* videoBackend=SDL_GetCurrentVideoDriver();
if (videoBackend!=NULL) {