Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configurable mouse sensitivity #915

Merged
merged 1 commit into from Jan 20, 2024
Merged

Conversation

dexgs
Copy link

@dexgs dexgs commented Jul 25, 2023

The --mouse-sensitivity/-s command line option allows the user to set the value g_mouseSensitivity which is used to scale the mouse movement in wlserver_mousemotion.

This works well for reducing sensitivity: sub-pixel increments taken into account to avoid jerky cursor movement as a result of rounding.

However, increasing sensitivity results in a loss of precision proportional to the multiplier since it seems mouse movements are only ever given in terms of pixels (i.e. a multiplier of 2.0 causes 2 pixels to be the shortest distance the cursor can be moved. If there is a way to get around this, please let me know).

This change is a possible workaround for #196 and #244, but the main motivation is to allow forcing mouse sensitivity scaling on games that don't respect the host mouse settings or otherwise misbehave with respect to cursor speed.

@Joshua-Ashton
Copy link
Collaborator

Why not just use wlserver_perform_rel_pointer_motion instead of implementing the same thing in wlserver_mousemotion. We can probably just remove wlserver_mousemotion at this point.

The `--mouse-sensitivity`/`-s` command line option allows the user to
set the value `g_mouseSensitivity` which is used to scale the mouse
movement in `wlserver_mousemotion`.
@dexgs
Copy link
Author

dexgs commented Oct 6, 2023

Okay, I've changed the implementation. I'm not sure how you want to move things around in order to call into wlserver_perform_rel_pointer_motion from outside wlserver, so I just replaced the body of wlserver_mousemotion with a call to it for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants