(RMenu) Default filebrowser startup dir fixed now

This commit is contained in:
twinaphex 2013-01-13 04:56:59 +01:00
parent 13ff3c3eb0
commit f001938b2e
2 changed files with 8 additions and 3 deletions

View File

@ -2495,11 +2495,11 @@ void init_filebrowser(void *data)
{
(void)data;
browser = filebrowser_init(default_paths.filebrowser_startup_dir, g_extern.system.valid_extensions);
browser = filebrowser_init(g_extern.console.main_wrap.default_rom_startup_dir, g_extern.system.valid_extensions);
tmpBrowser = filebrowser_init(default_paths.filesystem_root_dir, "");
menu_stack_push(FILE_BROWSER_MENU);
filebrowser_set_root_and_ext(browser, g_extern.system.valid_extensions, default_paths.filebrowser_startup_dir);
filebrowser_set_root_and_ext(browser, g_extern.system.valid_extensions, g_extern.console.main_wrap.default_rom_startup_dir);
filebrowser_set_root(tmpBrowser, default_paths.filesystem_root_dir);
}

View File

@ -465,7 +465,7 @@ bool config_load_file(const char *path)
CONFIG_GET_INT(input.device[i], cfg);
}
CONFIG_GET_STRING_EXTERN(console.main_wrap.default_rom_startup_dir, "default_rom_startup_dir");
CONFIG_GET_BOOL_EXTERN(console.screen.gamma_correction, "gamma_correction");
bool msg_enable = false;
@ -480,6 +480,11 @@ bool config_load_file(const char *path)
bool state_dir_enable = false;
int zip_extract_mode = 0;
char *has_set_path = NULL;
if (config_get_string(conf, "default_rom_startup_dir", &has_set_path))
strlcpy(g_extern.console.main_wrap.default_rom_startup_dir, has_set_path, sizeof(g_extern.console.main_wrap.default_rom_startup_dir));
if (config_get_bool(conf, "info_msg_enable", &msg_enable))
{
if (msg_enable)