[Scummvm-tracker] [ScummVM :: Bugs] #12646: PORTS: MACOS: Mac OS loss of mouse focus with OpenGL
ScummVM :: Bugs
trac at scummvm.org
Sat Feb 12 16:43:11 UTC 2022
#12646: PORTS: MACOS: Mac OS loss of mouse focus with OpenGL
------------------------------------+-----------------------------
Reporter: aculotarpa | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Port: Mac OS X
Version: | Resolution:
Keywords: Mac OS X, OpenGL, Mouse | Game:
------------------------------------+-----------------------------
Comment (by kalkie):
I've submitted a PR for fixing this issue:
https://github.com/scummvm/scummvm/pull/3699
There was an off-by-one kind of error in clipping the mouse coordinates to
the game's viewport in scaled HiDPI mode. At least MacOS is affected, but
based on comments in https://github.com/libsdl-org/SDL/issues/2119, also
iOS and Wayland have similar scaled HiDPI support.
If the mouse gets out of the game's viewport on right/bottom side, the
off-by-one error causes the cursor to be set on the outside edge of the
viewport, not inside of it. This leads into a loop, where the mouse is
again detected to be outside of the viewport, reset on the edge again,
etc., making the game freeze.
This 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
cursor cannot get outside of the allowed area, thus avoiding the issue.
--
Ticket URL: <https://bugs.scummvm.org/ticket/12646#comment:7>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list