mirror of
https://github.com/libretro/RetroArch
synced 2025-03-20 10:20:51 +00:00
Add early return in case cheat directory or remap file doesn't exist
This commit is contained in:
parent
6cbb3ba3c8
commit
6d5939063c
@ -402,6 +402,12 @@ static int action_ok_configurations_list(const char *path,
|
||||
static int action_ok_cheat_file(const char *path,
|
||||
const char *label, unsigned type, size_t idx)
|
||||
{
|
||||
if (!path_file_exists(g_settings.cheat_database))
|
||||
{
|
||||
msg_queue_clear(g_extern.msg_queue);
|
||||
msg_queue_push(g_extern.msg_queue, "Cheat Directory doesn't exist or cannot be accessed.\n", 1, 180);
|
||||
return -1;
|
||||
}
|
||||
return menu_list_push_stack_refresh(
|
||||
driver.menu->menu_list,
|
||||
g_settings.cheat_database,
|
||||
@ -411,6 +417,12 @@ static int action_ok_cheat_file(const char *path,
|
||||
static int action_ok_remap_file(const char *path,
|
||||
const char *label, unsigned type, size_t idx)
|
||||
{
|
||||
if (!path_file_exists(g_settings.input_remapping_directory))
|
||||
{
|
||||
msg_queue_clear(g_extern.msg_queue);
|
||||
msg_queue_push(g_extern.msg_queue, "Remapping Directory doesn't exist or cannot be accessed.\n", 1, 180);
|
||||
return -1;
|
||||
}
|
||||
return menu_list_push_stack_refresh(
|
||||
driver.menu->menu_list,
|
||||
g_settings.input_remapping_directory,
|
||||
|
Loading…
x
Reference in New Issue
Block a user