mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-26 22:43:01 +00:00
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…
Reference in a new issue