mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-31 23:34:36 +00:00
Move history_free and history_init to higher-level menu_common.c
This commit is contained in:
parent
d70a7df8ae
commit
8768a69bc6
@ -416,6 +416,14 @@ void menu_init(void)
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
shader_manager_init(rgui);
|
||||
#endif
|
||||
|
||||
// TODO: Should make history path configurable.
|
||||
// Possibly size as well.
|
||||
char history_path[PATH_MAX];
|
||||
fill_pathname_resolve_relative(history_path, g_extern.config_path,
|
||||
".retroarch-history.txt", sizeof(history_path));
|
||||
RARCH_LOG("[RGUI]: Opening history: %s.\n", history_path);
|
||||
rgui->history = rom_history_init(history_path, 20);
|
||||
}
|
||||
|
||||
void menu_free(void)
|
||||
@ -426,6 +434,8 @@ void menu_free(void)
|
||||
filebrowser_free(rgui->browser);
|
||||
#endif
|
||||
|
||||
rom_history_free(rgui->history);
|
||||
|
||||
free(rgui);
|
||||
}
|
||||
|
||||
|
@ -225,14 +225,6 @@ rgui_handle_t *rgui_init(void)
|
||||
(float)custom->width / custom->height;
|
||||
}
|
||||
|
||||
// TODO: Should make history path configurable.
|
||||
// Possibly size as well.
|
||||
char history_path[PATH_MAX];
|
||||
fill_pathname_resolve_relative(history_path, g_extern.config_path,
|
||||
".retroarch-history.txt", sizeof(history_path));
|
||||
RARCH_LOG("[RGUI]: Opening history: %s.\n", history_path);
|
||||
rgui->history = rom_history_init(history_path, 20);
|
||||
|
||||
return rgui;
|
||||
}
|
||||
|
||||
@ -245,7 +237,6 @@ void rgui_free(rgui_handle_t *rgui)
|
||||
libretro_free_system_info(&rgui->info);
|
||||
#endif
|
||||
|
||||
rom_history_free(rgui->history);
|
||||
rgui_list_free(rgui->menu_stack);
|
||||
rgui_list_free(rgui->selection_buf);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user