GUI: do not initialize haptic if not mobile

too slow
This commit is contained in:
tildearrow 2023-06-04 22:37:32 -05:00
parent d3aed5a06e
commit 8cd6554659
1 changed files with 4 additions and 0 deletions

View File

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