Browse Source

Disable SDL touch->mouse events

pull/1037/head
Ivan Epifanov 5 years ago committed by Anders Jenbo
parent
commit
ccf87f3bf3
  1. 10
      SourceX/display.cpp

10
SourceX/display.cpp

@ -116,11 +116,15 @@ void CalculatePreferdWindowSize(int &width, int &height, bool useIntegerScaling)
bool SpawnWindow(const char *lpWindowName) bool SpawnWindow(const char *lpWindowName)
{ {
#if SDL_VERSION_ATLEAST(2,0,6)
SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");
#endif
int initFlags = SDL_INIT_EVERYTHING & ~SDL_INIT_HAPTIC;
#ifdef __3DS__ #ifdef __3DS__
if (SDL_Init(SDL_INIT_TIMER | SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) <= -1) { initFlags = SDL_INIT_TIMER | SDL_INIT_VIDEO | SDL_INIT_JOYSTICK;
#else
if (SDL_Init(SDL_INIT_EVERYTHING & ~SDL_INIT_HAPTIC) <= -1) {
#endif #endif
if (SDL_Init(initFlags) <= -1) {
ErrSdl(); ErrSdl();
} }

Loading…
Cancel
Save