summaryrefslogtreecommitdiff
path: root/src/video/cocoa
diff options
context:
space:
mode:
authoregladil <egladil@openttd.org>2007-11-23 13:45:59 +0000
committeregladil <egladil@openttd.org>2007-11-23 13:45:59 +0000
commit2e0dd78ccfe2e4d12fbfd8b37a29fbc7d4d15b08 (patch)
tree3843ff186564a92e5db8b93cf66bed79ec65cf55 /src/video/cocoa
parent536be434118177078ccb76a17570fd9fc7fa43b6 (diff)
downloadopenttd-2e0dd78ccfe2e4d12fbfd8b37a29fbc7d4d15b08.tar.xz
(svn r11501) -Fix: [OSX] This remedies a problem with right click scrolling that was introduced in r11492.
Diffstat (limited to 'src/video/cocoa')
-rw-r--r--src/video/cocoa/wnd_quartz.mm3
-rw-r--r--src/video/cocoa/wnd_quickdraw.mm2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/video/cocoa/wnd_quartz.mm b/src/video/cocoa/wnd_quartz.mm
index 28603d8e4..bb1f2850e 100644
--- a/src/video/cocoa/wnd_quartz.mm
+++ b/src/video/cocoa/wnd_quartz.mm
@@ -690,9 +690,10 @@ CGPoint WindowQuartzSubdriver::PrivateLocalToCG(NSPoint* p)
{
CGPoint cgp;
+ p->y = window_height - p->y;
*p = [ qzview convertPoint:*p toView: nil ];
*p = [ window convertBaseToScreen:*p ];
- p->y = window_height - p->y;
+ p->y = device_height - p->y;
cgp.x = p->x;
cgp.y = p->y;
diff --git a/src/video/cocoa/wnd_quickdraw.mm b/src/video/cocoa/wnd_quickdraw.mm
index 4c125ae38..41d807bee 100644
--- a/src/video/cocoa/wnd_quickdraw.mm
+++ b/src/video/cocoa/wnd_quickdraw.mm
@@ -717,7 +717,7 @@ CGPoint WindowQuickdrawSubdriver::PrivateLocalToCG(NSPoint* p)
*p = [ qdview convertPoint:*p toView: nil ];
*p = [ window convertBaseToScreen:*p ];
- p->y = window_height - p->y;
+ p->y = device_height - p->y;
cgp.x = p->x;
cgp.y = p->y;