Skip to content

Conversation

@Razish
Copy link
Member

@Razish Razish commented Sep 25, 2023

With this enabled, the cursor moves about the same rate as my desktop cursor.
Without this, horizontal movement is too sensitive on e.g. 1920x1080 windowed.

It's optional behind a cvar because without a breaking API change[1] or a more complex solution[2], small (sub-pixel) movements are completely discarded by being truncated.
It may have also already been fixed by a mod[3], so we don't want to scale it twice.

[1] int -> float for UI_MOUSE_EVENT / CG_MOUSE_EVENT
[2] e.g. floating point accumulation buffer that emits movement events when it exceeds a whole number
[3] ja++ equivalent fix in ui/ui_main.cpp

@Razish Razish requested a review from a team September 25, 2023 13:19
Copy link

@bartrpe bartrpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I had it tested across various things:

  • two merged 1920x1080 screens (essentially 3840x1080... I should one day get to try to list all the various bugs that happen at this ultra wide level)
  • one 1920x1080
  • tested every resolution set that's preset at r_mode options
  • tested on 3840 x 2160 TV
  • tested on old 1280x1024 screen

did that with various mouses too because why not

no bugs found

@taysta
Copy link
Contributor

taysta commented May 21, 2025

I think a QoL change like this should be defaulted on since the average user probably won't be aware of this cvar.

Also, EternalJK and forks have had a similar change implemented and defaulted on for a long time, so the jarring difference in mouse scaling for these users would occur opposite of the situation described above.

I understand the arguments either way, as the base game has no such change and that could be considered as the "default" behaviour, so it's not a huge deal either way.

@ensiform
Copy link
Member

Doesn't this still need mod side fixes to notice that you passed floats rather than ints into the vm code ?

@Razish
Copy link
Member Author

Razish commented Oct 10, 2025

Doesn't this still need mod side fixes to notice that you passed floats rather than ints into the vm code ?

Nope, we're still passing ints to _UI_MouseEvent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants