GUI: check SDL_Init status
This commit is contained in:
parent
8c10c7ed5d
commit
b56be59344
|
|
@ -6021,7 +6021,14 @@ bool FurnaceGUI::init() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// initialize SDL
|
// 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();
|
const char* videoBackend=SDL_GetCurrentVideoDriver();
|
||||||
if (videoBackend!=NULL) {
|
if (videoBackend!=NULL) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue