mirror of
https://github.com/libretro/RetroArch
synced 2025-03-23 10:20:57 +00:00
Fix in rarch_configure_libretro
This commit is contained in:
parent
51d17c1040
commit
aedfb68603
@ -21,12 +21,12 @@
|
||||
|
||||
#include "rarch_console_config.h"
|
||||
|
||||
void rarch_config_load(const char * conf_name, const char * libretro_dir_path, const char * exe_ext, bool find_libretro_path)
|
||||
void rarch_config_load(const char * conf_name, const char * libretro_dir_path, const char * exe_ext, bool upgrade_core_succeeded)
|
||||
{
|
||||
char libretro_path_tmp[PATH_MAX];
|
||||
|
||||
//if a core has been upgraded, settings need to saved at the end
|
||||
if(!find_libretro_path)
|
||||
if(upgrade_core_succeeded)
|
||||
snprintf(libretro_path_tmp, sizeof(libretro_path_tmp), g_settings.libretro);
|
||||
|
||||
|
||||
@ -116,7 +116,7 @@ void rarch_config_load(const char * conf_name, const char * libretro_dir_path, c
|
||||
CONFIG_GET_INT_EXTERN(state_slot, "state_slot");
|
||||
CONFIG_GET_INT_EXTERN(audio_data.mute, "audio_mute");
|
||||
|
||||
if(!find_libretro_path)
|
||||
if(upgrade_core_succeeded)
|
||||
{
|
||||
//save config file with new libretro path
|
||||
snprintf(g_settings.libretro, sizeof(g_settings.libretro), libretro_path_tmp);
|
||||
|
@ -24,7 +24,7 @@ enum
|
||||
INPUT_PRESET_FILE
|
||||
};
|
||||
|
||||
void rarch_config_load(const char * conf_name, const char * libretro_dir_path, const char * exe_ext, bool find_libretro_path);
|
||||
void rarch_config_load(const char * conf_name, const char * libretro_dir_path, const char * exe_ext, bool upgrade_core_succeeded);
|
||||
void rarch_config_save(const char * conf_name);
|
||||
|
||||
#endif
|
||||
|
@ -57,7 +57,7 @@ void rarch_console_name_from_id(char *name, size_t size)
|
||||
bool rarch_configure_libretro_core(const char *core_exe_path, const char *tmp_path,
|
||||
const char *libretro_path, const char *config_path, const char *extension)
|
||||
{
|
||||
bool find_libretro_file = false;
|
||||
bool upgrade_core_succeeded = false;
|
||||
|
||||
g_extern.verbose = true;
|
||||
|
||||
@ -93,18 +93,18 @@ bool rarch_configure_libretro_core(const char *core_exe_path, const char *tmp_pa
|
||||
{
|
||||
RARCH_LOG("libretro core [%s] renamed to: [%s].\n", core_exe_path, tmp_pathnewfile);
|
||||
snprintf(g_settings.libretro, sizeof(g_settings.libretro), tmp_pathnewfile);
|
||||
upgrade_core_succeeded = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
RARCH_ERR("Failed to rename CORE executable.\n");
|
||||
RARCH_WARN("CORE executable was not found, or some other error occurred. Will attempt to load libretro core path from config file.\n");
|
||||
find_libretro_file = true;
|
||||
}
|
||||
}
|
||||
|
||||
g_extern.verbose = false;
|
||||
|
||||
return find_libretro_file;
|
||||
return upgrade_core_succeeded;
|
||||
}
|
||||
|
||||
bool rarch_manage_libretro_extension_supported(const char *filename)
|
||||
|
Loading…
x
Reference in New Issue
Block a user