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

Send only one mouse update per frame #321

Merged
merged 2 commits into from Mar 28, 2021

Conversation

Elektron72
Copy link
Contributor

ps2.c has been modified to not immediately send changes when mouse_move,
mouse_button_down, and mouse_button up are called. Instead, send_mouse_state
is now accessible from outside ps2.c, and it must be called to send the changes.
This allows us to call the other mouse functions for each mouse update received
from SDL2, which can happen multiple times per frame. Once all of the updates
are processed, send_mouse_state is called, which sends the combined updates
to the emulated system. This prevents the system from receiving too many
updates, which can lead to mouse lag, and therefore fixes #308.

Elektron72 and others added 2 commits August 25, 2020 17:10
ps2.c has been modified to not immediately send changes when mouse_move,
mouse_button_down, and mouse_button up are called. Instead, send_mouse_state
is now accessible from outside ps2.c, and it must be called to send the changes.
This allows us to call the other mouse functions for each mouse update received
from SDL2, which can happen multiple times per frame. Once all of the updates
are processed, send_mouse_state is called, which sends the combined updates
to the emulated system. This prevents the system from receiving too many
updates, which can lead to mouse lag.
@mist64 mist64 merged commit 13b9a57 into commanderx16:master Mar 28, 2021
@Elektron72 Elektron72 deleted the mouse-fix branch March 28, 2021 15:19
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.

Laggy mouse movement
2 participants