RawInput and older windows OS versions

Archived bsnes development news, feature requests and bug reports. Forum is now located at http://board.byuu.org/
Locked
krick

RawInput and older windows OS versions

Post by krick »

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/
byuu

Re: RawInput and older windows OS versions

Post by byuu »

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/
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");

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.
Locked