mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-03 08:40:59 +00:00
IPHONE: Fixed mouse position when the overlay is visible
This commit is contained in:
parent
0b8d2c4d60
commit
5a3aa7a994
@ -175,13 +175,18 @@ const char* iPhone_getDocumentsDir() {
|
||||
}
|
||||
|
||||
bool getLocalMouseCoords(CGPoint *point) {
|
||||
if (point->x < _screenRect.origin.x || point->x >= _screenRect.origin.x + _screenRect.size.width ||
|
||||
point->y < _screenRect.origin.y || point->y >= _screenRect.origin.y + _screenRect.size.height) {
|
||||
return false;
|
||||
}
|
||||
if (_overlayIsEnabled) {
|
||||
point->x = point->x / _overlayHeight;
|
||||
point->y = point->y / _overlayWidth;
|
||||
} else {
|
||||
if (point->x < _screenRect.origin.x || point->x >= _screenRect.origin.x + _screenRect.size.width ||
|
||||
point->y < _screenRect.origin.y || point->y >= _screenRect.origin.y + _screenRect.size.height) {
|
||||
return false;
|
||||
}
|
||||
|
||||
point->x = (point->x - _screenRect.origin.x) / _screenRect.size.width;
|
||||
point->y = (point->y - _screenRect.origin.y) / _screenRect.size.height;
|
||||
point->x = (point->x - _screenRect.origin.x) / _screenRect.size.width;
|
||||
point->y = (point->y - _screenRect.origin.y) / _screenRect.size.height;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user