Explorar o código

Fixes a crash that occurs on linux headless servers

Marc Chapman %!s(int64=6) %!d(string=hai) anos
pai
achega
a578ef77d3
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      Engine/source/windowManager/sdl/sdlWindowMgr.cpp

+ 2 - 0
Engine/source/windowManager/sdl/sdlWindowMgr.cpp

@@ -504,10 +504,12 @@ void InitWindowingSystem()
 
 AFTER_MODULE_INIT(gfx)
 {
+#if !defined(TORQUE_DEDICATED)
    int res = SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_EVENTS | SDL_INIT_NOPARACHUTE);
    AssertFatal(res != -1, avar("SDL error:%s", SDL_GetError()));
 
    // By default, SDL enables text input. We disable it on initialization, and
    // we will enable it whenever the time is right.
    SDL_StopTextInput();
+#endif
 }