mirror of
https://github.com/libretro/RetroArch
synced 2025-04-15 14:42:27 +00:00
(Apple) Refactor core_info_set_core_path
This commit is contained in:
parent
cb7ad2d6e6
commit
d388b49a93
@ -147,7 +147,7 @@ static char** waiting_argv;
|
||||
|
||||
self.settingsWindow = [[[NSWindowController alloc] initWithWindowNibName:BOXSTRING("Settings")] autorelease];
|
||||
|
||||
core_info_set_core_path(g_defaults.core_dir);
|
||||
core_info_set_core_path();
|
||||
core_info_set_config_path(g_defaults.menu_config_dir);
|
||||
core_list = (const core_info_list_t*)core_info_list_get();
|
||||
|
||||
|
@ -225,7 +225,7 @@ static void handle_touch_event(NSArray* touches)
|
||||
}
|
||||
|
||||
// Warn if there are no cores present
|
||||
core_info_set_core_path(g_defaults.core_dir);
|
||||
core_info_set_core_path();
|
||||
core_info_set_config_path(g_defaults.menu_config_dir);
|
||||
core_list = (const core_info_list_t*)core_info_list_get();
|
||||
|
||||
|
@ -434,15 +434,9 @@ void core_info_list_get_missing_firmware(core_info_list_t *core_info_list,
|
||||
qsort(info->firmware, info->firmware_count, sizeof(*info->firmware), core_info_firmware_cmp);
|
||||
}
|
||||
|
||||
void core_info_set_core_path(const char *core_path)
|
||||
void core_info_set_core_path(void)
|
||||
{
|
||||
if (global_core_list)
|
||||
core_info_list_free(global_core_list);
|
||||
|
||||
global_core_list = core_path ? core_info_list_new(core_path) : 0;
|
||||
|
||||
if (!global_core_list)
|
||||
RARCH_WARN("No cores were found at %s", core_path ? core_path : "(null");
|
||||
global_core_list = core_info_list_new(g_defaults.core_dir);
|
||||
}
|
||||
|
||||
void core_info_set_config_path(const char *config_path)
|
||||
@ -453,9 +447,6 @@ void core_info_set_config_path(const char *config_path)
|
||||
|
||||
core_info_list_t *core_info_list_get(void)
|
||||
{
|
||||
if (!global_core_list)
|
||||
RARCH_WARN("core_info_list_get() called before core_info_set_core_path()");
|
||||
|
||||
return global_core_list;
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ const char *core_info_list_get_all_extensions(core_info_list_t *list);
|
||||
|
||||
bool core_info_list_get_display_name(core_info_list_t *list, const char *path, char *buf, size_t size);
|
||||
|
||||
void core_info_set_core_path(const char *core_path);
|
||||
void core_info_set_core_path(void);
|
||||
void core_info_set_config_path(const char *config_path);
|
||||
|
||||
core_info_list_t *core_info_list_get(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user