Commit 2c90fe6b authored by Ryan C. Gordon's avatar Ryan C. Gordon

Close off warning about setAppleMenu on Mac OS X 10.4 SDK.

     Fixes Bugzilla #97.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401596
parent 95e9bf51
...@@ -10,6 +10,13 @@ ...@@ -10,6 +10,13 @@
#import <sys/param.h> /* for MAXPATHLEN */ #import <sys/param.h> /* for MAXPATHLEN */
#import <unistd.h> #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 */ /* Use this flag to determine whether we use SDLMain.nib or not */
#define SDL_USE_NIB_FILE 0 #define SDL_USE_NIB_FILE 0
...@@ -82,7 +89,7 @@ static NSString *getApplicationName(void) ...@@ -82,7 +89,7 @@ static NSString *getApplicationName(void)
char parentdir[MAXPATHLEN]; char parentdir[MAXPATHLEN];
CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle()); CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle());
CFURLRef url2 = CFURLCreateCopyDeletingLastPathComponent(0, url); 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 */ assert ( chdir (parentdir) == 0 ); /* chdir to the binary app's parent */
} }
CFRelease(url); CFRelease(url);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment