Hi,
The Windows version of our SDL2.0.16 game does not run on Linux WINE.
The issue is with SDL2’s sensor subsystem.
How would we SDL_Init() everything except: SDL_INIT_SENSOR?
Let us know, thanks!
Jesse
Hi,
The Windows version of our SDL2.0.16 game does not run on Linux WINE.
The issue is with SDL2’s sensor subsystem.
How would we SDL_Init() everything except: SDL_INIT_SENSOR?
Let us know, thanks!
Jesse
Got it working:
if ( SDL_Init(SDL_INIT_TIMER|SDL_INIT_AUDIO|SDL_INIT_VIDEO|SDL_INIT_JOYSTICK|SDL_INIT_HAPTIC|SDL_INIT_GAMECONTROLLER|SDL_INIT_EVENTS) != 0 )
We just fixed this at the last moment for 2.0.18, so the sensor subsystem doesn’t prevent Wine builds from working:
But it’s generally it’s better to not use SDL_INIT_EVERYTHING
because sometimes things like this happen and you never know if an entire new subsystem might show up at some point anyhow.
But if you did want “everything but the sensors,” a convenient C technique for that:
SDL_Init(SDL_INIT_EVERYTHING & ~SDL_INIT_SENSOR);
The ~
flips the bits used by SDL_INIT_SENSOR
(making it all ones except that specific flag, which becomes zero), so when you &
those flipped bits with SDL_INIT_EVERYTHING
, you get everything except that one flag.