bibendovsky / ltjs

LithTech Jupiter System
47 stars 13 forks source link

Weird mouse movement #32

Closed juunr95 closed 3 years ago

juunr95 commented 3 years ago

Did anyone realize that, in high polling rate, mouse movements seens weird ? Like making a wave ?

bibendovsky commented 3 years ago

Does it weird in original NOLF2?

juunr95 commented 3 years ago

Yes

bibendovsky commented 3 years ago

Added SDL backend (#34). Does it resolves the issue?

juunr95 commented 3 years ago

Yes, that solves it, but I would like to understand why the original code has this problem.

bibendovsky commented 3 years ago

My guess is because of the way DirectInput handles raw input.
Internally, DirectInput creates a second thread to read WM_INPUT data, and using the DirectInput APIs will add more overhead than simply reading WM_INPUT directly.

Also the engine reads only one event per request for system mouse device. System mouse device has a special name in configuration file - ##mouse.