(OSX PPC) More build 'fixes'

This commit is contained in:
twinaphex 2014-04-14 18:30:21 +02:00
parent f2c78c36e3
commit d290cda2a9
14 changed files with 36 additions and 6 deletions

View File

@ -158,14 +158,17 @@ static char** waiting_argv;
for (int i = 0; cores && i != cores->count; i ++)
{
NSString* desc = BOXSTRING(cores->list[i].display_name);
#if defined(MAC_OS_X_VERSION_10_6)
/* FIXME - Rewrite this so that this is no longer an associated object - requires ObjC 2.0 runtime */
objc_setAssociatedObject(desc, associated_core_key, apple_get_core_id(&cores->list[i]), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
[cb addItemWithObjectValue:desc];
#endif
[cb addItemWithObjectValue:desc];
}
if ([cb numberOfItems])
[cb selectItemAtIndex:0];
else
apple_display_alert(@"No libretro cores were found.\nSelect \"Go->Cores Directory\" from the menu and place libretro dylib files there.", @"RetroArch");
apple_display_alert(BOXSTRING("No libretro cores were found.\nSelect \"Go->Cores Directory\" from the menu and place libretro dylib files there."), BOXSTRING("RetroArch"));
if (waiting_argc)
{
@ -225,6 +228,7 @@ static char** waiting_argv;
- (void)openDocument:(id)sender
{
NSOpenPanel* panel = [NSOpenPanel openPanel];
#if defined(MAC_OS_X_VERSION_10_6)
[panel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result)
{
[[NSApplication sharedApplication] stopModal];
@ -235,6 +239,9 @@ static char** waiting_argv;
[self performSelector:@selector(chooseCore) withObject:nil afterDelay:.5f];
}
}];
#else
[panel beginSheetForDirectory:nil file:nil modalForWindopw:[self window] modalDelegate:self didEndSelector:@selector(didEndSaveSheet:returnCode:contextInfo:) contextInfo:NULL];
#endif
[[NSApplication sharedApplication] runModalForWindow:panel];
}

View File

@ -88,9 +88,12 @@ static void* const associated_name_tag = (void*)&associated_name_tag;
@end
@interface RASettingsDelegate : NSObject<NSTableViewDataSource, NSTableViewDelegate,
NSOutlineViewDataSource, NSOutlineViewDelegate,
NSWindowDelegate>
@interface RASettingsDelegate : NSObject
#ifdef MAC_OS_X_VERSION_10_6
<NSTableViewDataSource, NSTableViewDelegate,
NSOutlineViewDataSource, NSOutlineViewDelegate,
NSWindowDelegate>
#endif
{
RAInputBinder* _binderWindow;
NSButtonCell* _booleanCell;
@ -150,7 +153,10 @@ static void* const associated_name_tag = (void*)&associated_name_tag;
case ST_GROUP:
{
thisGroup = [NSMutableArray array];
#if defined(MAC_OS_X_VERSION_10_6)
/* FIXME - Rewrite this so that this is no longer an associated object - requires ObjC 2.0 runtime */
objc_setAssociatedObject(thisGroup, associated_name_tag, [NSString stringWithFormat:@"%s", setting_data[i].name], OBJC_ASSOCIATION_RETAIN_NONATOMIC);
#endif
break;
}
@ -165,7 +171,10 @@ static void* const associated_name_tag = (void*)&associated_name_tag;
case ST_SUB_GROUP:
{
thisSubGroup = [NSMutableArray array];
#if defined(MAC_OS_X_VERSION_10_6)
/* FIXME - Rewrite this so that this is no longer an associated object - requires ObjC 2.0 runtime */
objc_setAssociatedObject(thisSubGroup, associated_name_tag, [NSString stringWithFormat:@"%s", setting_data[i].name], OBJC_ASSOCIATION_RETAIN_NONATOMIC);
#endif
break;
}
@ -184,14 +193,20 @@ static void* const associated_name_tag = (void*)&associated_name_tag;
}
}
}
#ifdef MAC_OS_X_VERSION_10_6
/* FIXME - fix for 10.5.8 and lower */
setting_data_load_config_path(setting_data_get_list(), [apple_platform.globalConfigFile UTF8String]);
#endif
apple_stop_iteration();
}
- (void)windowWillClose:(NSNotification *)notification
{
#ifdef MAC_OS_X_VERSION_10_6
/* FIXME - fix for 10.5.8 and lower */
setting_data_save_config_path(setting_data_get_list(), [apple_platform.globalConfigFile UTF8String]);
#endif
[NSApp stopModal];
apple_start_iteration();

View File

@ -8,6 +8,8 @@
/* Begin PBXBuildFile section */
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
7A7C248118FC43ED00DB92FD /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A7C248018FC43ED00DB92FD /* CoreFoundation.framework */; };
7A7C24C318FC446400DB92FD /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A7C24C218FC446400DB92FD /* IOKit.framework */; };
7AA19E9618AA09D000D16488 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7AA19E9518AA09D000D16488 /* OpenGL.framework */; };
7AA19E9E18AA0C9900D16488 /* platform.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AA19E9D18AA0C9900D16488 /* platform.m */; };
7AA19EA018AA0CA600D16488 /* settings.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AA19E9F18AA0CA600D16488 /* settings.m */; };
@ -27,6 +29,8 @@
1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
7A7C248018FC43ED00DB92FD /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
7A7C24C218FC446400DB92FD /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
7AA19E9518AA09D000D16488 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
7AA19E9D18AA0C9900D16488 /* platform.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = platform.m; path = ../OSX/platform.m; sourceTree = SOURCE_ROOT; };
7AA19E9F18AA0CA600D16488 /* settings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = settings.m; path = ../OSX/settings.m; sourceTree = SOURCE_ROOT; };
@ -46,6 +50,8 @@
files = (
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
7AA19E9618AA09D000D16488 /* OpenGL.framework in Frameworks */,
7A7C248118FC43ED00DB92FD /* CoreFoundation.framework in Frameworks */,
7A7C24C318FC446400DB92FD /* IOKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -88,6 +94,8 @@
29B97314FDCFA39411CA2CEA /* RetroArch_OSX_PPC */ = {
isa = PBXGroup;
children = (
7A7C248018FC43ED00DB92FD /* CoreFoundation.framework */,
7A7C24C218FC446400DB92FD /* IOKit.framework */,
7AA19E9518AA09D000D16488 /* OpenGL.framework */,
080E96DDFE201D6D7F000001 /* Classes */,
29B97315FDCFA39411CA2CEA /* Other Sources */,