mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 17:33:05 +00:00
SDL: Clip the coordinates sent by mouse events
This commit is contained in:
parent
e99a2fa8c3
commit
5cb84a437d
@ -192,6 +192,9 @@ bool SdlGraphicsManager::showMouse(bool visible) {
|
||||
}
|
||||
|
||||
bool SdlGraphicsManager::notifyMousePosition(Common::Point &mouse) {
|
||||
mouse.x = CLIP<int16>(mouse.x, 0, _windowWidth - 1);
|
||||
mouse.y = CLIP<int16>(mouse.y, 0, _windowHeight - 1);
|
||||
|
||||
int showCursor = SDL_DISABLE;
|
||||
bool valid = true;
|
||||
if (_activeArea.drawRect.contains(mouse)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user