aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/iphone
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/iphone')
-rw-r--r--backends/platform/iphone/iphone_video.m17
1 files changed, 11 insertions, 6 deletions
diff --git a/backends/platform/iphone/iphone_video.m b/backends/platform/iphone/iphone_video.m
index 09832c783e..006603df64 100644
--- a/backends/platform/iphone/iphone_video.m
+++ b/backends/platform/iphone/iphone_video.m
@@ -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;
}