Skip to content

Commit

Permalink
Close off warning about setAppleMenu on Mac OS X 10.4 SDK.
Browse files Browse the repository at this point in the history
     Fixes Bugzilla #97.
  • Loading branch information
icculus committed Mar 22, 2006
1 parent 177bde8 commit 0e8cb71
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/macosx/SDLMain.m
Expand Up @@ -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

Expand Down Expand Up @@ -82,7 +89,7 @@ - (void) setupWorkingDirectory:(BOOL)shouldChdir
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);
Expand Down

0 comments on commit 0e8cb71

Please sign in to comment.