mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-03 02:04:01 +00:00
Save to ROM history when loading from CLI.
This commit is contained in:
parent
3e9b982118
commit
50bd5bb4ff
@ -52,6 +52,19 @@ int main(int argc, char *argv[])
|
||||
menu_init();
|
||||
g_extern.lifecycle_mode_state |= 1ULL << MODE_GAME;
|
||||
|
||||
// If we started a ROM directly from command line,
|
||||
// push it to ROM history.
|
||||
if (!g_extern.libretro_dummy)
|
||||
{
|
||||
// g_extern.fullpath can be relative here.
|
||||
if (*g_extern.fullpath)
|
||||
path_resolve_realpath(g_extern.fullpath, sizeof(g_extern.fullpath));
|
||||
|
||||
menu_rom_history_push(*g_extern.fullpath ? g_extern.fullpath : NULL,
|
||||
g_settings.libretro,
|
||||
g_extern.system.info.library_name);
|
||||
}
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if (g_extern.system.shutdown)
|
||||
|
@ -363,6 +363,14 @@ void rgui_list_get_last(const rgui_list_t *list,
|
||||
|
||||
#endif
|
||||
|
||||
void menu_rom_history_push(const char *path,
|
||||
const char *core_path,
|
||||
const char *core_name)
|
||||
{
|
||||
if (rgui->history)
|
||||
rom_history_push(rgui->history, path, core_path, core_name);
|
||||
}
|
||||
|
||||
void load_menu_game_prepare(void)
|
||||
{
|
||||
if (*g_extern.fullpath || rgui->load_no_rom)
|
||||
@ -378,13 +386,9 @@ void load_menu_game_prepare(void)
|
||||
msg_queue_push(g_extern.msg_queue, str, 1, 1);
|
||||
}
|
||||
|
||||
if (rgui->history)
|
||||
{
|
||||
rom_history_push(rgui->history,
|
||||
*g_extern.fullpath ? g_extern.fullpath : NULL,
|
||||
g_settings.libretro,
|
||||
rgui->info.library_name);
|
||||
}
|
||||
menu_rom_history_push(*g_extern.fullpath ? g_extern.fullpath : NULL,
|
||||
g_settings.libretro,
|
||||
rgui->info.library_name);
|
||||
}
|
||||
|
||||
#ifdef HAVE_RGUI
|
||||
|
@ -282,6 +282,8 @@ void menu_ticker_line(char *buf, size_t len, unsigned tick, const char *str, boo
|
||||
void load_menu_game_prepare(void);
|
||||
bool load_menu_game(void);
|
||||
void load_menu_game_history(unsigned game_index);
|
||||
void menu_rom_history_push(const char *path, const char *core_path,
|
||||
const char *core_name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user