Failure in SDL_joystick.c when building 2.0.9 without DirectX on Windows

It is not currently possible to build SDL 2.0.9 with joystick support on Windows when DirectX is disabled. Disabling DirectX results in the cmake variable SDL_JOYSTICK_WINMM being set (and associated #define in the code) but a compilation failure occurs in SDL_joystick.c:

  src\joystick\SDL_joystick.c(79): error C2059: syntax error: '}'

Which is due to an empty SDL_joystick_drivers[] array. I had a quick look to see if there was an easy fix but there seem to be some missing functions in the SDL_mmjoystick.c file that would have to be implemented to make it compatible with the SDL_JoystickDriver struct.

Development environment: Windows 10 Pro 1709 with VS 2015 Pro.
CMake command: cmake -G "Visual Studio 15 2015 Win64" -DDIRECTX=FALSE -DSDL_STATIC=FALSE ..\

Let me know if there is further info I can provide.

1 Like

Anyone figure this one out? Something major broke in one of my projects between 2.0.8 and 2.0.10. I have a feeling it’s somewhere in 2.0.9, but I can’t be sure until I get it to compile. Same error as above. So far I’ve tried disabling SDL_JOYSTICK and SDK_HAPTIC causing more errors then before.