From 8cd65546598e67e81b487cad8055eef2ca412643 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sun, 4 Jun 2023 22:37:32 -0500 Subject: [PATCH] GUI: do not initialize haptic if not mobile too slow --- src/gui/gui.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 456de03a..e6a94beb 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -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) {