GUI: check SDL_Init status
This commit is contained in:
parent
8c10c7ed5d
commit
b56be59344
1 changed files with 8 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue