Windows SDL2.0.16 Does Not Run On Linux WINE - Issue With SDL_INIT_SENSOR


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!


Got it working:



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:


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.

1 Like