diff options
author | yexo <yexo@openttd.org> | 2012-09-13 18:42:33 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2012-09-13 18:42:33 +0000 |
commit | 1f75f81a417b0f540826ee7c1eeb952b7738b929 (patch) | |
tree | f1e132ff2d560893f1d9c6926449eb735969732e | |
parent | bd173618173e0cdf6477e1df4f715cc486779828 (diff) | |
download | openttd-1f75f81a417b0f540826ee7c1eeb952b7738b929.tar.xz |
(svn r24524) -Fix [FS#5296]: fix some compile problems in mac-only code (__ln__)
-rw-r--r-- | src/os/macosx/G5_detector.cpp | 2 | ||||
-rw-r--r-- | src/video/cocoa/cocoa_v.mm | 4 | ||||
-rw-r--r-- | src/video/cocoa/fullscreen.mm | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/os/macosx/G5_detector.cpp b/src/os/macosx/G5_detector.cpp index ad69a2e43..53d21c4d4 100644 --- a/src/os/macosx/G5_detector.cpp +++ b/src/os/macosx/G5_detector.cpp @@ -21,7 +21,7 @@ #endif /* this function is a lightly modified version of some code from Apple's developer homepage to detect G5 CPUs at runtime */ -main() +int main() { host_basic_info_data_t hostInfo; mach_msg_type_number_t infoCount; diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index 3b85f9e8b..9045f3262 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -241,7 +241,7 @@ static CocoaSubdriver *QZ_CreateWindowSubdriver(int width, int height, int bpp) CocoaSubdriver *ret; #endif -#ifdef ENABLE_COCOA_QUARTZ && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) +#if defined(ENABLE_COCOA_QUARTZ) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) /* The reason for the version mismatch is due to the fact that the 10.4 binary needs to work on 10.5 as well. */ if (MacOSVersionIsAtLeast(10, 5, 0)) { ret = QZ_CreateWindowQuartzSubdriver(width, height, bpp); @@ -254,7 +254,7 @@ static CocoaSubdriver *QZ_CreateWindowSubdriver(int width, int height, int bpp) if (ret != NULL) return ret; #endif -#ifdef ENABLE_COCOA_QUARTZ && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) +#if defined(ENABLE_COCOA_QUARTZ) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) /* * If we get here we are running 10.4 or earlier and either openttd was compiled without the QuickDraw driver * or it failed to load for some reason. Fall back to Quartz if possible even though that driver is slower. diff --git a/src/video/cocoa/fullscreen.mm b/src/video/cocoa/fullscreen.mm index bd55852c3..c8148edfc 100644 --- a/src/video/cocoa/fullscreen.mm +++ b/src/video/cocoa/fullscreen.mm @@ -65,7 +65,7 @@ struct OTTD_QuartzGammaTable { @end @implementation NSScreen (NSScreenAccess) -- (void) setFrame:(NSRect)frame; +- (void) setFrame:(NSRect)frame { /* The 64 bits libraries don't seem to know about _frame, so this hack won't work. */ #if !__LP64__ |