Skip to content

Mouse sensitivity in menu vs in game #876

Description

@sergiu-petrica

The problem

The mouse sensitivity in the menu is completely different compared to in game, which makes it painful every time I switch from gameplay to navigating the menu.

Furthermore, the menu seems to completely ignore any mouse sensitivity or acceleration defined in the game settings.

In the CONTRIBUTING.md file it looks like the issue template is missing, so I'll just write some extra details here, as outlined in the contribution file:

Reproduction steps

  1. Launch the game and start any type of match.
  2. Take note of the ingame mouse sensitivity
  3. Hit Esc to bring up the menu
  4. Take another note of the menu sensitivity, it should be completely different
  5. Access the game settings from the menu and alter the mouse sensitivity or smoothing
  6. Take note that there's no difference in mouse behaviour in the menu
  7. Hit Esc a few times to go back to the game
  8. Take note that the game mouse behaviour correctly follows said settings

Expected behaviour

I'd expect the mouse to be at least somewhat consistent between the menu and in game, if not 100% accurate.
I don't think the goal here should necessarily be to have a 1:1 accuracy between ingame and menu (I think that would be very difficult, more below on my analysis of the code), but a reasonable approximation would still be a big improvement.

Tested on

  • Windows 11 latest build
  • Latest version of the game found at https://ioquake3.org/get-it/ and I've also compiled manually from source
  • 1440p resolution
  • Various FOV settings between 70 and 100
  • Though I don't think it matters, my hardware is Ryzen 5800X, RTX 5080 and 32GB RAM, mouse is Logitech Superlight 2 running on 1200DPI with an ingame sensitivity of 1.0

Some preliminary code analysis

Take this with a grain of salt since my C skills are rusty. But if I'm understanding this right from the code, the issue is caused by 2 things:

  1. the menu seems to be some sort of virtual pixel representation of a 640x480 grid regardless of what resolution you're on, which is completely different from the game itself
  2. the menu codepath takes raw input from the mouse and completely ignores the sensitivity and acceleration defined in the game settings

Because of point 1 above, I think it's very hard to get a 100% faithful equivalent of in-game vs menu sensitivity, looks to me like a lot of the core menu code would need to be rewritten which isn't realistic. But we could at least approximate it, which would still be a big improvement.

Is this something one of the core contributors could take a look at? I could also try to fix it and open a PR, but I'd need someone to thoroughly review my code and suggest improvements because, as mentioned before, writing games in C really isn't my area of expertise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions