Browse Source

🐛 Only initialize the subsystems that we use

Fixes #1391

For now this stops the initalization of sensor subsystem, but in the
future SDL may add more that we do not care about.
pull/1485/head
Anders Jenbo 5 years ago
parent
commit
0cc788b33d
  1. 6
      SourceX/display.cpp

6
SourceX/display.cpp

@ -125,9 +125,9 @@ bool SpawnWindow(const char *lpWindowName)
SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0"); SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");
#endif #endif
int initFlags = SDL_INIT_EVERYTHING & ~SDL_INIT_HAPTIC; int initFlags = SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_JOYSTICK;
#ifdef __3DS__ #ifndef USE_SDL1
initFlags = SDL_INIT_TIMER | SDL_INIT_VIDEO | SDL_INIT_JOYSTICK; initFlags |= SDL_INIT_GAMECONTROLLER;
#endif #endif
if (SDL_Init(initFlags) <= -1) { if (SDL_Init(initFlags) <= -1) {
ErrSdl(); ErrSdl();

Loading…
Cancel
Save