mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-08 20:07:11 +00:00
AGS: Engine: prevent cursor from leaving game area
From upstream 8cf49996d05a6fb4fd8691fa87fb6a12114e45d7
This commit is contained in:
parent
2ef1dfd3a6
commit
5614bc15de
@ -72,8 +72,8 @@ void mgetgraphpos() {
|
||||
_G(real_mouse_y) = CLIP(_G(real_mouse_y) + rel_y, _GP(mouse).ControlRect.Top, _GP(mouse).ControlRect.Bottom);
|
||||
} else {
|
||||
// Save real cursor coordinates provided by system
|
||||
_G(real_mouse_x) = _G(sys_mouse_x);
|
||||
_G(real_mouse_y) = _G(sys_mouse_y);
|
||||
_G(real_mouse_x) = CLIP((int)_G(sys_mouse_x), _GP(mouse).ControlRect.Left, _GP(mouse).ControlRect.Right);
|
||||
_G(real_mouse_y) = CLIP((int)_G(sys_mouse_y), _GP(mouse).ControlRect.Top, _GP(mouse).ControlRect.Bottom);
|
||||
}
|
||||
|
||||
// Set new in-game cursor position
|
||||
|
Loading…
x
Reference in New Issue
Block a user