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

IOS7: Update mouse implementation #4997

Merged
merged 6 commits into from
May 15, 2023

Conversation

larsamannen
Copy link
Contributor

This PR separates touches and mouse events. Mouse events are calculated using delta values sent by the OS. The deltaX and deltaY movements have to be scaled according to the video context resolution. Else low resolution games will have faster mouse movements.
Delta values are also sent with the MOUSEMOVE events since some games depends on them (e.g. Myst 3)

Implement support of changing mouse pointer speed. This will affect connected mice, game controllers and touches when in touchpad mode.

The current mouse events are handling events created from both touch
and mouse input. The events have lots of logic to deal with gestures
and different modes (touchpad mode, click-and-drag etc) which are not
applicable for hardware inputs.

Rename the current "mouse events" to "touch events" to clarify which
input that triggered an event. As this is the first commit in multi-
commit change, the mouse input need to use the "touch events" until
a new "mouse event" is implemented.
Add input events that can be used by mouse devices, e.g. mices and
touchpads. This event sends the raw input actions and doesn't care
about different controller modes such as click-and-drag.

Make the mouse controller utilize the new mouse input events.
The delta values are in number of pixels on the native screen
resolution. Need to scale down the delta values based on the
game resolution. Store reminders that are added to next deltas
to mitigate "dead zones" if doing small movements.
Implement support to set the mouse pointer speed in settings.
The mouse pointer speed is applied to both mouse input and touch
input when in touchpad-mode.
Send relative mouse movements from backend for touch events. The
relative x and y values are necessary for some games, e.g. Myst3.
Instead of having duplicated code, utilize the delta mouse function
also for touches when in touchpad mode.
@larsamannen larsamannen merged commit 8e97e8d into scummvm:master May 15, 2023
@larsamannen larsamannen deleted the ls_more_mouse_work branch May 15, 2023 10:43
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