It's possible to have an app detect the OS version and fall back to DirectInput if RawInput is not available. Check out the 2004-04-22 entry on Jake Stookey's site...
http://jstookey.com/arcade/rawmouse/
RawInput and older windows OS versions
Re: RawInput and older windows OS versions
I tried that for XInput. MinGW creates code that crashes inside msvcrt!memcpy() when you call the function pointer returned from GetProcAddress(LoadLibrary("xinput1_3.dll"), "XInputGetState");krick wrote:It's possible to have an app detect the OS version and fall back to DirectInput if RawInput is not available. Check out the 2004-04-22 entry on Jake Stookey's site...
http://jstookey.com/arcade/rawmouse/
Only happens when compiled into bsnes too, maybe some stack memory corruption? Who knows, I otherwise have no problems with any code. It's definitely the pXInputGetState() call that causes the crash though.
And that was just one function. Doing that for RawInput would require hooking at least a half-dozen.
If people need Win2k support, I can make a binary that only uses DirectInput.