Unscaled mouse input for InputProcess

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Unscaled mouse input for InputProcess

Unscaled mouse input for InputProcess

by phantombeta » Thu Apr 11, 2019 12:55 pm

MouseX/Y are scaled by default, and it would be rather useful to have the unscaled mouse input data in InputEvent.
An use case for this is System Shock-style interfaces.

While helping someone with doing a System Shock-like UI in ZScript, we've encountered some problems.
Since both menus and UiProcess completely block input, we had to go with manually doing a mouse pointer with InputProcess - that also stops the mouse from leaving the window, which is nice.

But prescaling messes this up. When it's on, the mouse input received through InputProcess is prescaled, too.
It'd be easy to handle this by just reversing the scaling based on whether prescaling is on or not...
But not only are there three different mouse input modes on Windows, there's also no reliable way to determine if the game is running on UNIX, which has its own mouse handling.

If InputEvent also carried the unscaled mouse input, we could easily fix this by using that instead.
I imagine this use case is not really supported, but currently, this is the only way to do a decent System Shock-style interface.

Top