[Scummvm-tracker] [ScummVM :: Bugs] #13152: MYST3: Mouse movements are limited to rectangle in full screen mode when using SDL v2.0.18
ScummVM :: Bugs
trac at scummvm.org
Sat Feb 12 18:19:25 UTC 2022
#13152: MYST3: Mouse movements are limited to rectangle in full screen mode when
using SDL v2.0.18
---------------------+----------------------------
Reporter: ctoroman | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: Myst3
Version: | Resolution:
Keywords: | Game: Myst 3: Exile
---------------------+----------------------------
Comment (by kalkie):
Does this issue occur in scaled HiDPI mode, e.g. on MacOS with a Retina
display? If so, then I've submitted a PR for fixing this issue:
https://github.com/scummvm/scummvm/pull/3699
The usage of SDL_SetWindowMouseRect() didn't take the HiDPI scaling into
account. Thus, the coordinates of the allowed mouse area were off by the
scaling factor, e.g. 2x greater than they should be. Now that this
SDL_SetWindowMouseRect() is used, there are actually two parallel
mechanisms for grabbing the mouse and limiting its movement to the game's
viewport. Because of this, not taking the HiDPI scaling into account
limits the mouse movement incorrectly only on the left/top part of the
screen.
This issue only happens with the OpenGL graphics mode, because the SDL
Surface mode doesn't support HiDPI mode. There are quite a few workarounds
for the issue, in addition to changing the graphics mode. One could
disable mouse capture (Ctrl+m) or change to one of the stretch modes
filling the entire screen with the game. If the game's viewport fills the
whole window, the top/left coordinates of the allowed mouse area are zero,
and thus not being affected by the incorrect scaling.
--
Ticket URL: <https://bugs.scummvm.org/ticket/13152#comment:4>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list