mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
(Apple) Refactor away core_info_set_config_path
This commit is contained in:
parent
d388b49a93
commit
d0cad26627
@ -148,7 +148,6 @@ static char** waiting_argv;
|
||||
self.settingsWindow = [[[NSWindowController alloc] initWithWindowNibName:BOXSTRING("Settings")] autorelease];
|
||||
|
||||
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();
|
||||
|
||||
// Create core select list
|
||||
|
@ -226,7 +226,6 @@ static void handle_touch_event(NSArray* touches)
|
||||
|
||||
// Warn if there are no cores present
|
||||
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();
|
||||
|
||||
if (!core_list || core_list->count == 0)
|
||||
|
@ -25,7 +25,6 @@
|
||||
#endif
|
||||
|
||||
static core_info_list_t *global_core_list;
|
||||
static char core_config_path[PATH_MAX];
|
||||
|
||||
static void core_info_list_resolve_all_extensions(core_info_list_t *core_info_list)
|
||||
{
|
||||
@ -439,12 +438,6 @@ void core_info_set_core_path(void)
|
||||
global_core_list = core_info_list_new(g_defaults.core_dir);
|
||||
}
|
||||
|
||||
void core_info_set_config_path(const char *config_path)
|
||||
{
|
||||
if (!config_path || strlcpy(core_config_path, config_path, sizeof(core_config_path)) >= PATH_MAX)
|
||||
*core_config_path = '\0';
|
||||
}
|
||||
|
||||
core_info_list_t *core_info_list_get(void)
|
||||
{
|
||||
return global_core_list;
|
||||
@ -468,7 +461,7 @@ const char *core_info_get_custom_config(const char *core_id, char *buffer, size_
|
||||
if (!core_id || !buffer || !buffer_length)
|
||||
return 0;
|
||||
|
||||
fill_pathname_join(buffer, core_config_path, path_basename(core_id), buffer_length);
|
||||
fill_pathname_join(buffer, g_defaults.menu_config_dir, path_basename(core_id), buffer_length);
|
||||
fill_pathname(buffer, buffer, ".cfg", buffer_length);
|
||||
return buffer;
|
||||
}
|
||||
|
@ -87,7 +87,6 @@ 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(void);
|
||||
void core_info_set_config_path(const char *config_path);
|
||||
|
||||
core_info_list_t *core_info_list_get(void);
|
||||
const core_info_t *core_info_list_get_by_id(const char *core_id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user