mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 02:10:28 +00:00

The mouse position is set in window coordinates, but it's clipped to the game area in drawable area coordinates. Previously, the scaling between these two was not taken into account when calculating the right/bottom edges of the game area. When the clipped mouse position was converted back to window coordinates and rounded to the nearest integer, it could end up on the edge of the game area, not inside of it. This leads to a loop in which the clipped mouse position is outside of the game area and needs to be clipped again. This fixes bug #12646.