Skip to content

Improve -nomousegrab mouse input handling #702

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

Merged
merged 1 commit into from
May 23, 2025

Conversation

Lgt2x
Copy link
Member

@Lgt2x Lgt2x commented May 13, 2025

Pull Request Type

  • GitHub Workflow changes
  • Documentation or Wiki changes
  • Build and Dependency changes
  • Runtime changes
    • Render changes
    • Audio changes
    • Input changes
    • Network changes
    • Other changes

Description

Minor fixes to #695 (@tophyr ):

  • event->motion.[x/y]rel is float, so store DDIO_mouse_state.dx as float to avoid losing precision. This is especially needed when mouse is not grabbed by the window (-nomousegrab option) where xrel/yrel does not only have integer values.
  • Remove broken legacy code supporting -nomousegrab mode. Position is still not the same between the actual OS cursor and the in-game cursor, but it is better than it was before.

@Lgt2x Lgt2x changed the title Minor mouse input improvements Improve -nomousegrab mouse input handling May 13, 2025
@winterheart
Copy link
Collaborator

Mouse handling on -nomousegrab in windowed mode much better, but still not accurate.

@winterheart winterheart merged commit 76b527b into DescentDevelopers:main May 23, 2025
8 checks passed
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.

2 participants