mirror of
https://github.com/libretro/RetroArch
synced 2025-02-26 06:40:39 +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
|
#ifdef HAVE_SHADER_MANAGER
|
||||||
shader_manager_init(rgui);
|
shader_manager_init(rgui);
|
||||||
#endif
|
#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)
|
void menu_free(void)
|
||||||
@ -426,6 +434,8 @@ void menu_free(void)
|
|||||||
filebrowser_free(rgui->browser);
|
filebrowser_free(rgui->browser);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
rom_history_free(rgui->history);
|
||||||
|
|
||||||
free(rgui);
|
free(rgui);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -225,14 +225,6 @@ rgui_handle_t *rgui_init(void)
|
|||||||
(float)custom->width / custom->height;
|
(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;
|
return rgui;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,7 +237,6 @@ void rgui_free(rgui_handle_t *rgui)
|
|||||||
libretro_free_system_info(&rgui->info);
|
libretro_free_system_info(&rgui->info);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rom_history_free(rgui->history);
|
|
||||||
rgui_list_free(rgui->menu_stack);
|
rgui_list_free(rgui->menu_stack);
|
||||||
rgui_list_free(rgui->selection_buf);
|
rgui_list_free(rgui->selection_buf);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user