Unscaled mouse input for InputProcess

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

Unscaled mouse input for InputProcess

Postby phantombeta » Thu Apr 11, 2019 1: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.
User avatar
phantombeta
In the meadow of sinful thoughts, every flower's a perfect one
 
Joined: 02 May 2013
Location: The United Soviet Socialist Dictatorship of Hueland
Discord: phantombeta#2461
Twitch ID: phantombeta_
Github ID: Doom2fan
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support

Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest