Mac OS X additions - loading of fonts from user's Fonts directory, rearrangement of files in XCode project.

This commit is contained in:
Martin Fuhrer 2005-01-08 19:41:05 +00:00
parent 4ffabe2d15
commit 25d52d3aa7
6 changed files with 1701 additions and 502 deletions

View file

@ -87,6 +87,7 @@ static NSString *getApplicationName(void)
@interface CocoaToSDLBridge : NSObject {}
- (void)dataPath:(NSString *)directory;
- (void)preferencesPath;
- (void)fontsPath;
@end
@implementation CocoaToSDLBridge
@ -110,6 +111,14 @@ static NSString *getApplicationName(void)
[path getCString:(macosx.preferencesPath)];
}
-(void) fontsPath;
{
NSString *path;
path = [@"~/Library/Fonts" stringByExpandingTildeInPath];
[path getCString:(macosx.fontsPath)];
}
@end
@ -238,6 +247,7 @@ static void CustomApplicationMain (argc, argv)
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
SDLMain *sdlMain;
CocoaToSDLBridge *bridge;
/* Ensure the application object is initialised */
[SDLApplication sharedApplication];
@ -258,6 +268,11 @@ static void CustomApplicationMain (argc, argv)
setApplicationMenu();
setupWindowMenu();
/* Pass information to SDL application */
bridge = [[CocoaToSDLBridge alloc] init];
[bridge autorelease];
[bridge fontsPath];
/* Create SDLMain and make it the app delegate */
sdlMain = [[SDLMain alloc] init];
[NSApp setDelegate:sdlMain];