SDL: Clip the coordinates sent by mouse events
This commit is contained in:
parent
e99a2fa8c3
commit
5cb84a437d
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue