changeset 1591:24247fe40188

Close off warning about setAppleMenu on Mac OS X 10.4 SDK. Fixes Bugzilla #97.
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 22 Mar 2006 22:33:23 +0000
parents 96d8c3fec479
children 802de24df8d9
files src/main/macosx/SDLMain.m
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/macosx/SDLMain.m	Wed Mar 22 22:29:44 2006 +0000
+++ b/src/main/macosx/SDLMain.m	Wed Mar 22 22:33:23 2006 +0000
@@ -10,6 +10,13 @@
 #import <sys/param.h> /* for MAXPATHLEN */
 #import <unistd.h>
 
+/* For some reaon, Apple removed setAppleMenu from the headers in 10.4,
+ but the method still is there and works. To avoid warnings, we declare
+ it ourselves here. */
+@interface NSApplication(SDL_Missing_Methods)
+- (void)setAppleMenu:(NSMenu *)menu;
+@end
+
 /* Use this flag to determine whether we use SDLMain.nib or not */
 #define		SDL_USE_NIB_FILE	0
 
@@ -82,7 +89,7 @@
         char parentdir[MAXPATHLEN];
 		CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle());
 		CFURLRef url2 = CFURLCreateCopyDeletingLastPathComponent(0, url);
-		if (CFURLGetFileSystemRepresentation(url2, true, parentdir, MAXPATHLEN)) {
+		if (CFURLGetFileSystemRepresentation(url2, true, (UInt8 *)parentdir, MAXPATHLEN)) {
 	        assert ( chdir (parentdir) == 0 );   /* chdir to the binary app's parent */
 		}
 		CFRelease(url);