haekb / nolf2-modernizer

NOLF 2 Modernizer aims to unlock resolution support, restore multi-player support, and fix a few bugs here and there.
https://haekb.itch.io/nolf2-modernizer
30 stars 4 forks source link

Fix DInput vs RawInput issues #35

Closed haekb closed 4 years ago

haekb commented 4 years ago

Fixes #33

DirectInput8 uses RawInput to read mouse and keyboard commands. However the engine is doing something funky with those mouse readings causing the weirdest mouse movement ever. So in my quest to replace it with my own..

I've created a proxy dinput8.dll that will ignore any mouse GetDeviceData calls. This lets me not have to worry about DirectInput8's mouse commands ever firing.

I then created a new proxy function for ClearInput where I tell modernizer to re-register SDL's raw input mode. I also tell modernizer to re-register SDL's raw input mode on ActivateApp.

I just need to handle all the mouse inputs manually now...