mirror of
https://github.com/libretro/RetroArch
synced 2025-04-23 11:43:20 +00:00
(Apple) Cleanups
This commit is contained in:
parent
8a7c639734
commit
fefc2f808c
@ -131,7 +131,7 @@ static char** waiting_argv;
|
|||||||
{
|
{
|
||||||
NSArray *paths;
|
NSArray *paths;
|
||||||
NSComboBox* cb;
|
NSComboBox* cb;
|
||||||
const core_info_list_t* cores;
|
const core_info_list_t* core_list;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
apple_platform = self;
|
apple_platform = self;
|
||||||
@ -155,26 +155,24 @@ static char** waiting_argv;
|
|||||||
|
|
||||||
self.settingsWindow = [[[NSWindowController alloc] initWithWindowNibName:BOXSTRING("Settings")] autorelease];
|
self.settingsWindow = [[[NSWindowController alloc] initWithWindowNibName:BOXSTRING("Settings")] autorelease];
|
||||||
|
|
||||||
|
core_info_set_core_path(self.coreDirectory.UTF8String);
|
||||||
|
core_info_set_config_path(self.configDirectory.UTF8String);
|
||||||
|
core_list = (const core_info_list_t*)core_info_list_get();
|
||||||
|
|
||||||
// Create core select list
|
// Create core select list
|
||||||
cb = (NSComboBox*)[[self.coreSelectSheet contentView] viewWithTag:1];
|
cb = (NSComboBox*)[[self.coreSelectSheet contentView] viewWithTag:1];
|
||||||
|
|
||||||
core_info_set_core_path(self.coreDirectory.UTF8String);
|
for (i = 0; core_list && i < core_list->count; i ++)
|
||||||
core_info_set_config_path(self.configDirectory.UTF8String);
|
|
||||||
cores = (const core_info_list_t*)core_info_list_get();
|
|
||||||
|
|
||||||
for (i = 0; cores && i < cores->count; i ++)
|
|
||||||
{
|
{
|
||||||
NSString* desc = (NSString*)BOXSTRING(cores->list[i].display_name);
|
NSString* desc = (NSString*)BOXSTRING(core_list->list[i].display_name);
|
||||||
#if defined(MAC_OS_X_VERSION_10_6)
|
#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 */
|
/* 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);
|
objc_setAssociatedObject(desc, associated_core_key, apple_get_core_id(&core_list->list[i]), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
||||||
#endif
|
#endif
|
||||||
[cb addItemWithObjectValue:desc];
|
[cb addItemWithObjectValue:desc];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cb.numberOfItems)
|
if (!core_list || core_list->count == 0)
|
||||||
[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("No libretro cores were found.\nSelect \"Go->Cores Directory\" from the menu and place libretro dylib files there.", "RetroArch");
|
||||||
|
|
||||||
if (waiting_argc)
|
if (waiting_argc)
|
||||||
|
@ -267,7 +267,6 @@ static void handle_touch_event(NSArray* touches)
|
|||||||
// Warn if there are no cores present
|
// Warn if there are no cores present
|
||||||
core_info_set_core_path(self.coreDirectory.UTF8String);
|
core_info_set_core_path(self.coreDirectory.UTF8String);
|
||||||
core_info_set_config_path(self.configDirectory.UTF8String);
|
core_info_set_config_path(self.configDirectory.UTF8String);
|
||||||
|
|
||||||
core_list = (const core_info_list_t*)core_info_list_get();
|
core_list = (const core_info_list_t*)core_info_list_get();
|
||||||
|
|
||||||
if (!core_list || core_list->count == 0)
|
if (!core_list || core_list->count == 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user