diff -r 6c435c0075e7 src/os/macosx/osx_stdafx.h --- a/src/os/macosx/osx_stdafx.h Sun Oct 04 21:39:12 2009 +0000 +++ b/src/os/macosx/osx_stdafx.h Mon Oct 05 11:25:29 2009 +0200 @@ -32,7 +32,7 @@ #endif /* Check for mismatching 'architectures' */ -#if (__LP64__ && !defined(_SQ64)) || (!__LP64__ && defined(_SQ64)) +#if ((__LP64__ && !defined(_SQ64)) || (!__LP64__ && defined(_SQ64))) && (!defined(STRGEN)) # error "Compiling 64 bits without _SQ64 set! (or vice versa)" #endif diff -r 6c435c0075e7 src/video/cocoa/fullscreen.mm --- a/src/video/cocoa/fullscreen.mm Sun Oct 04 21:39:12 2009 +0000 +++ b/src/video/cocoa/fullscreen.mm Mon Oct 05 11:25:29 2009 +0200 @@ -267,6 +267,11 @@ boolean_t exact_match; this->cur_mode = CGDisplayBestModeForParameters(this->display_id, this->display_depth, w, h, &exact_match); + /* Define variables before jumps are made. gcc 4.2 likes it better */ + NSRect screen_rect; + NSPoint pt; + int gamma_error; + /* If the mode wasn't an exact match, check if it has the right bpp, and update width and height */ if (!exact_match) { int bpp; @@ -286,7 +291,7 @@ /* Fade display to zero gamma */ OTTD_QuartzGammaTable gamma_table; - int gamma_error = this->FadeGammaOut(&gamma_table); + gamma_error = this->FadeGammaOut(&gamma_table); /* Put up the blanking window (a window above all other windows) */ if (CGDisplayCapture(this->display_id) != CGDisplayNoErr ) { @@ -305,7 +310,7 @@ this->display_width = CGDisplayPixelsWide(this->display_id); this->display_height = CGDisplayPixelsHigh(this->display_id); - + /* Setup double-buffer emulation */ this->pixel_buffer = malloc(this->display_width * this->display_height * this->display_depth / 8); if (this->pixel_buffer == NULL) { @@ -330,11 +335,11 @@ * We can hack around this bug by setting the screen rect ourselves. * This hack should be removed if/when the bug is fixed. */ - NSRect screen_rect = NSMakeRect(0, 0, this->display_width, this->display_height); + screen_rect = NSMakeRect(0, 0, this->display_width, this->display_height); [ [ NSScreen mainScreen ] setFrame:screen_rect ]; - NSPoint pt = [ NSEvent mouseLocation ]; + pt = [ NSEvent mouseLocation ]; pt.y = this->display_height - pt.y; if (this->MouseIsInsideView(&pt)) QZ_HideMouse();