per-core minor fixes

This commit is contained in:
Toad King 2014-01-01 19:06:06 -05:00
parent e022b39061
commit e0671aba8b
3 changed files with 5 additions and 1 deletions

View File

@ -1515,6 +1515,7 @@ bool menu_replace_config(const char *path)
// Load dummy core.
*g_extern.fullpath = '\0';
*g_extern.original_config_path = '\0';
*g_settings.libretro = '\0'; // Load core in new config.
g_extern.lifecycle_state |= (1ULL << MODE_LOAD_GAME);
rgui->load_no_rom = false;

View File

@ -444,6 +444,7 @@ int menu_set_settings(void *data, unsigned setting, unsigned action)
g_extern.config_save_on_exit = true;
break;
case RGUI_SETTINGS_PER_CORE_CONFIG:
g_extern.block_config_read = false;
if (action == RGUI_ACTION_OK || action == RGUI_ACTION_RIGHT
|| action == RGUI_ACTION_LEFT)
g_settings.core_specific_config = !g_settings.core_specific_config;

View File

@ -448,6 +448,7 @@ void config_load(void)
if (!*g_extern.original_config_path)
{
// save the original path for saving. a copy of the last core's settings is always saved to the original config file path for future launches
path_resolve_realpath(g_extern.config_path, sizeof(g_extern.config_path));
strlcpy(g_extern.original_config_path, g_extern.config_path, sizeof(g_extern.original_config_path));
}
@ -461,6 +462,7 @@ void config_load(void)
}
else
{
// use original config file's directory
strlcpy(g_extern.core_specific_config_path, g_extern.original_config_path, sizeof(g_extern.core_specific_config_path));
path_basedir(g_extern.core_specific_config_path);
}
@ -477,7 +479,7 @@ void config_load(void)
if (!config_load_file(g_extern.config_path))
RARCH_WARN("Core-specific config not found, reusing last config.\n");
// make sure we don't accidentally switch this
// don't have the core config file overwrite the libretro path
strlcpy(g_settings.libretro, tmp, sizeof(g_settings.libretro));
}
}