mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-25 00:49:47 +00:00
(RARCH_CONSOLE) Refactor rarch_configure_libretro_core
This commit is contained in:
parent
528ba5c9bb
commit
ba64d7fa3f
@ -140,7 +140,7 @@ end:
|
||||
dir_list_free(dir_list);
|
||||
}
|
||||
|
||||
void rarch_configure_libretro(const input_driver_t *input, const char *path_prefix, const char * extension)
|
||||
bool rarch_configure_libretro(const input_driver_t *input, const char *path_prefix, const char * extension)
|
||||
{
|
||||
char full_path[1024];
|
||||
snprintf(full_path, sizeof(full_path), "%sCORE%s", path_prefix, extension);
|
||||
@ -148,9 +148,7 @@ void rarch_configure_libretro(const input_driver_t *input, const char *path_pref
|
||||
bool find_libretro_file = rarch_configure_libretro_core(full_path, path_prefix, path_prefix,
|
||||
default_paths.config_file, extension);
|
||||
|
||||
rarch_settings_set_default(input);
|
||||
rarch_config_load(default_paths.config_file, path_prefix, extension, find_libretro_file);
|
||||
init_libretro_sym();
|
||||
return find_libretro_file;
|
||||
}
|
||||
|
||||
bool rarch_manage_libretro_extension_supported(const char *filename)
|
||||
|
@ -18,7 +18,6 @@
|
||||
#define LIBRETRO_MGMT_H__
|
||||
|
||||
#include "../boolean.h"
|
||||
#include "../driver.h"
|
||||
|
||||
enum
|
||||
{
|
||||
@ -29,7 +28,7 @@ enum
|
||||
};
|
||||
|
||||
void rarch_manage_libretro_set_first_file(char *first_file, size_t size_of_first_file, const char *libretro_path, const char * exe_ext);
|
||||
void rarch_configure_libretro(const input_driver_t *input, const char *path_prefix, const char * extension);
|
||||
bool rarch_configure_libretro(const input_driver_t *input, const char *path_prefix, const char * extension);
|
||||
bool rarch_manage_libretro_extension_supported(const char *filename);
|
||||
|
||||
#endif
|
||||
|
@ -254,7 +254,15 @@ int main(int argc, char *argv[])
|
||||
|
||||
char tmp_path[PATH_MAX];
|
||||
snprintf(tmp_path, sizeof(tmp_path), "%s/", default_paths.core_dir);
|
||||
rarch_configure_libretro(&input_ps3, tmp_path, default_paths.executable_extension);
|
||||
const char *path_prefix = tmp_path;
|
||||
const char *extension = default_paths.executable_extension;
|
||||
const input_driver_t *input = &input_ps3;
|
||||
|
||||
bool find_libretro_file = rarch_configure_libretro(input, path_prefix, extension);
|
||||
|
||||
rarch_settings_set_default(input);
|
||||
rarch_config_load(default_paths.config_file, path_prefix, extension, find_libretro_file);
|
||||
init_libretro_sym();
|
||||
|
||||
input_ps3.post_init();
|
||||
|
||||
|
@ -129,7 +129,15 @@ int main(int argc, char *argv[])
|
||||
config_set_defaults();
|
||||
|
||||
input_xinput.init();
|
||||
rarch_configure_libretro(&input_xinput, default_paths.filesystem_root_dir, default_paths.executable_extension);
|
||||
|
||||
const char *path_prefix = default_paths.filesystem_root_dir;
|
||||
const char *extension = default_paths.executable_extension;
|
||||
const input_driver_t *input = &input_xinput;
|
||||
bool find_libretro_file = rarch_configure_libretro(input, path_prefix, extension);
|
||||
|
||||
rarch_settings_set_default(input);
|
||||
rarch_config_load(default_paths.config_file, path_prefix, extension, find_libretro_file);
|
||||
init_libretro_sym();
|
||||
|
||||
input_xinput.post_init();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user