mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 09:39:56 +00:00
(Menu) Fix core loading from history
This commit is contained in:
parent
77db458ce5
commit
2008667640
@ -144,9 +144,6 @@ bool menu_load_content(void)
|
|||||||
driver_t *driver = driver_get_ptr();
|
driver_t *driver = driver_get_ptr();
|
||||||
global_t *global = global_get_ptr();
|
global_t *global = global_get_ptr();
|
||||||
|
|
||||||
if (*global->fullpath || (driver->menu && driver->menu->load_no_content))
|
|
||||||
push_to_history_playlist();
|
|
||||||
|
|
||||||
/* redraw menu frame */
|
/* redraw menu frame */
|
||||||
if (driver->menu)
|
if (driver->menu)
|
||||||
driver->menu->msg_force = true;
|
driver->menu->msg_force = true;
|
||||||
@ -175,6 +172,10 @@ bool menu_load_content(void)
|
|||||||
menu_shader_manager_init(driver->menu);
|
menu_shader_manager_init(driver->menu);
|
||||||
|
|
||||||
rarch_main_command(RARCH_CMD_HISTORY_INIT);
|
rarch_main_command(RARCH_CMD_HISTORY_INIT);
|
||||||
|
|
||||||
|
if (*global->fullpath || (driver->menu && driver->menu->load_no_content))
|
||||||
|
push_to_history_playlist();
|
||||||
|
|
||||||
rarch_main_command(RARCH_CMD_VIDEO_SET_ASPECT_RATIO);
|
rarch_main_command(RARCH_CMD_VIDEO_SET_ASPECT_RATIO);
|
||||||
rarch_main_command(RARCH_CMD_RESUME);
|
rarch_main_command(RARCH_CMD_RESUME);
|
||||||
|
|
||||||
|
14
playlist.c
14
playlist.c
@ -18,6 +18,7 @@
|
|||||||
#include "playlist.h"
|
#include "playlist.h"
|
||||||
#include <compat/posix_string.h>
|
#include <compat/posix_string.h>
|
||||||
#include <boolean.h>
|
#include <boolean.h>
|
||||||
|
#include "retroarch_logger.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -116,6 +117,15 @@ void content_playlist_push(content_playlist_t *playlist,
|
|||||||
if (!playlist)
|
if (!playlist)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!core_path || !*core_path || !core_name || !*core_name)
|
||||||
|
{
|
||||||
|
RARCH_ERR("cannot push NULL or empty core info into the playlist");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (path && !*path)
|
||||||
|
path = NULL;
|
||||||
|
|
||||||
for (i = 0; i < playlist->size; i++)
|
for (i = 0; i < playlist->size; i++)
|
||||||
{
|
{
|
||||||
content_playlist_entry_t tmp;
|
content_playlist_entry_t tmp;
|
||||||
@ -155,8 +165,8 @@ void content_playlist_push(content_playlist_t *playlist,
|
|||||||
(playlist->cap - 1) * sizeof(content_playlist_entry_t));
|
(playlist->cap - 1) * sizeof(content_playlist_entry_t));
|
||||||
|
|
||||||
playlist->entries[0].path = path ? strdup(path) : NULL;
|
playlist->entries[0].path = path ? strdup(path) : NULL;
|
||||||
playlist->entries[0].core_path = core_path ? strdup(core_path) : NULL;
|
playlist->entries[0].core_path = strdup(core_path);
|
||||||
playlist->entries[0].core_name = core_name ? strdup(core_name) : NULL;
|
playlist->entries[0].core_name = strdup(core_name);
|
||||||
playlist->size++;
|
playlist->size++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user