I have an issue where SDL_NumHaptics() is returning 0 in Windows 8 or 8.1, when a any standard XInput controller is plugged in. No error message is set.
Everything works fine under Windows 7. NumHaptics returns the correct number, SDL_HapticOpen() and SDL_HapticRumbleInit() get the controller vibrating. The issue is the same on a variety of different machines.
My suspicion is something to do with the use of XInput 1.4 in Windows 8. Has anyone dealt with similar issues or have any insight?
Are you using SDL’s WinRT backend on Windows 8, i.e. are you creating a separate “Windows Store” .exe, or are you taking one .exe, running it on a bunch of machines (some Win 7, some Win 8.x), and noticing the problem when it runs on Win 8.x?
I ask as I can answer why haptic wouldn’t work when compiled as a WinRT app: haptic isn’t yet supported there (in theory it could be, it just hasn’t been added to SDL/WinRT yet). I’m not sure why it wouldn’t work when an app is compiled for Win32 / Windows Desktop (for Win 7, etc.) though. :-/
– David L.
Yes, unfortunately, it is a single Windows Desktop exe being built and run on the different operating systems (not trying to do a Metro app or anything). Something else I can look into though, thank you for the suggestion!