summaryrefslogtreecommitdiff
path: root/src/video
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2010-11-18 20:45:27 +0000
committerplanetmaker <planetmaker@openttd.org>2010-11-18 20:45:27 +0000
commit94c45d9cc34afca7b66e1cf4595bff816123b055 (patch)
treed17d9cc9dd3676bca4941c31c98c36c82a433cb0 /src/video
parent16c90ed48bf8e840d303ff3f52984e91d6e22776 (diff)
downloadopenttd-94c45d9cc34afca7b66e1cf4595bff816123b055.tar.xz
(svn r21245) -Fix (r21200): [OSX] Make gcc 4.2 happy
Diffstat (limited to 'src/video')
-rw-r--r--src/video/cocoa/fullscreen.mm5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/video/cocoa/fullscreen.mm b/src/video/cocoa/fullscreen.mm
index 1a791a811..1f35d2c59 100644
--- a/src/video/cocoa/fullscreen.mm
+++ b/src/video/cocoa/fullscreen.mm
@@ -264,9 +264,10 @@ class FullscreenSubdriver: public CocoaSubdriver {
bool SetVideoMode(int w, int h)
{
/* Define this variables at the top (against coding style) because
- * otherwise GCC barfs at the goto's jumping over variable initialization. */
+ * otherwise GCC 4.2 barfs at the goto's jumping over variable initialization. */
NSRect screen_rect;
int gamma_error;
+ NSPoint mouseLocation;
/* Destroy any previous mode */
if (this->pixel_buffer != NULL) {
@@ -299,7 +300,7 @@ class FullscreenSubdriver: public CocoaSubdriver {
CGDisplayCapture(this->display_id);
/* Store the mouse coordinates relative to the total screen */
- NSPoint mouseLocation = [ NSEvent mouseLocation ];
+ mouseLocation = [ NSEvent mouseLocation ];
mouseLocation.x /= this->display_width;
mouseLocation.y /= this->display_height;