(RMenu) filebrowser_free called at end of menu_loop - filebrowser_init

called at start of menu_loop
This commit is contained in:
twinaphex 2012-08-17 18:22:28 +02:00
parent d709cb04b4
commit 07c6ff5666

View File

@ -2307,18 +2307,25 @@ void menu_init (void)
retro_get_system_info(&info);
const char *id = info.library_name ? info.library_name : "Unknown";
snprintf(m_title, sizeof(m_title), "Libretro core: %s %s", id, info.library_version);
}
static void filebrowser_init(void)
{
menu_stack_push(rmenu_items, FILE_BROWSER_MENU);
filebrowser_set_root_and_ext(&browser, rarch_console_get_rom_ext(), default_paths.filebrowser_startup_dir);
filebrowser_set_root(&tmpBrowser, default_paths.filesystem_root_dir);
}
void menu_free (void)
static void filebrowser_free(void)
{
filebrowser_free(&browser);
filebrowser_free(&tmpBrowser);
}
void menu_free (void)
{
}
void menu_loop(void)
{
DEVICE_CAST device_ptr = (DEVICE_CAST)driver.video_data;
@ -2326,6 +2333,8 @@ void menu_loop(void)
g_console.menu_enable = true;
device_ptr->block_swap = true;
filebrowser_init();
if(g_console.ingame_menu_enable)
menu_stack_push(ingame_menu_settings, INGAME_MENU);
@ -2607,6 +2616,8 @@ void menu_loop(void)
texture_image_free(&m_menuMainRomSelectPanel);
#endif
filebrowser_free();
if(g_console.ingame_menu_enable)
menu_stack_decrement();