[Scummvm-cvs-logs] scummvm master -> 5a3aa7a994b772c8f084350f6f80d38a3ae4ddaa
vinterstum
oystein at geheb.com
Mon May 16 03:48:54 CEST 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5a3aa7a994 IPHONE: Fixed mouse position when the overlay is visible
Commit: 5a3aa7a994b772c8f084350f6f80d38a3ae4ddaa
https://github.com/scummvm/scummvm/commit/5a3aa7a994b772c8f084350f6f80d38a3ae4ddaa
Author: Oystein Eftevaag (oystein at geheb.com)
Date: 2011-05-15T18:47:11-07:00
Commit Message:
IPHONE: Fixed mouse position when the overlay is visible
Changed paths:
backends/platform/iphone/iphone_video.m
diff --git a/backends/platform/iphone/iphone_video.m b/backends/platform/iphone/iphone_video.m
index 09832c7..006603d 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;
}
More information about the Scummvm-git-logs
mailing list