mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
Get rid of menu_entry_pathdir_set_value
This commit is contained in:
parent
4ec1a9e337
commit
1000c08a7f
@ -837,7 +837,8 @@ enum
|
|||||||
ACTION_OK_LOAD_CONFIG_FILE,
|
ACTION_OK_LOAD_CONFIG_FILE,
|
||||||
ACTION_OK_LOAD_CORE,
|
ACTION_OK_LOAD_CORE,
|
||||||
ACTION_OK_LOAD_WALLPAPER,
|
ACTION_OK_LOAD_WALLPAPER,
|
||||||
ACTION_OK_SET_PATH
|
ACTION_OK_SET_PATH,
|
||||||
|
ACTION_OK_SET_DIRECTORY
|
||||||
};
|
};
|
||||||
|
|
||||||
static int generic_action_ok(const char *path,
|
static int generic_action_ok(const char *path,
|
||||||
@ -946,6 +947,7 @@ static int generic_action_ok(const char *path,
|
|||||||
command_event(CMD_EVENT_DISK_APPEND_IMAGE, action_path);
|
command_event(CMD_EVENT_DISK_APPEND_IMAGE, action_path);
|
||||||
command_event(CMD_EVENT_RESUME, NULL);
|
command_event(CMD_EVENT_RESUME, NULL);
|
||||||
break;
|
break;
|
||||||
|
case ACTION_OK_SET_DIRECTORY:
|
||||||
case ACTION_OK_SET_PATH:
|
case ACTION_OK_SET_PATH:
|
||||||
flush_type = 49;
|
flush_type = 49;
|
||||||
{
|
{
|
||||||
@ -1239,10 +1241,8 @@ static int action_ok_remap_file_save_game(const char *path,
|
|||||||
int action_ok_path_use_directory(const char *path,
|
int action_ok_path_use_directory(const char *path,
|
||||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||||
{
|
{
|
||||||
const char *menu_path = NULL;
|
return generic_action_ok(path, label, type, idx, entry_idx,
|
||||||
|
ACTION_OK_SET_DIRECTORY, MENU_ENUM_LABEL_UNKNOWN);
|
||||||
menu_entries_get_last_stack(&menu_path, NULL, NULL, NULL);
|
|
||||||
return menu_entry_pathdir_set_value(0, menu_path);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LIBRETRODB
|
#ifdef HAVE_LIBRETRODB
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include "menu_cbs.h"
|
#include "menu_cbs.h"
|
||||||
#include "../verbosity.h"
|
#include "../verbosity.h"
|
||||||
|
|
||||||
#if 0
|
#if 1
|
||||||
#define DEBUG_LOG
|
#define DEBUG_LOG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -214,24 +214,6 @@ void menu_entry_pathdir_get_value(uint32_t i, char *s, size_t len)
|
|||||||
strlcpy(s, entry.value, len);
|
strlcpy(s, entry.value, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
int menu_entry_pathdir_set_value(uint32_t i, const char *s)
|
|
||||||
{
|
|
||||||
menu_file_list_cbs_t *cbs = menu_entries_get_last_stack_actiondata();
|
|
||||||
|
|
||||||
if (!cbs || !cbs->setting)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (menu_setting_get_type(cbs->setting) != ST_DIR)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
menu_setting_set_with_string_representation(cbs->setting, s);
|
|
||||||
menu_setting_generic(cbs->setting, false);
|
|
||||||
|
|
||||||
menu_entries_flush_stack(NULL, 49);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void menu_entry_pathdir_extensions(uint32_t i, char *s, size_t len)
|
void menu_entry_pathdir_extensions(uint32_t i, char *s, size_t len)
|
||||||
{
|
{
|
||||||
rarch_setting_t *setting = menu_entries_get_setting(i);
|
rarch_setting_t *setting = menu_entries_get_setting(i);
|
||||||
|
@ -86,8 +86,6 @@ uint32_t menu_entry_pathdir_for_directory(uint32_t i);
|
|||||||
|
|
||||||
void menu_entry_pathdir_get_value(uint32_t i, char *s, size_t len);
|
void menu_entry_pathdir_get_value(uint32_t i, char *s, size_t len);
|
||||||
|
|
||||||
int menu_entry_pathdir_set_value(uint32_t i, const char *s);
|
|
||||||
|
|
||||||
void menu_entry_pathdir_extensions(uint32_t i, char *s, size_t len);
|
void menu_entry_pathdir_extensions(uint32_t i, char *s, size_t len);
|
||||||
|
|
||||||
void menu_entry_reset(uint32_t i);
|
void menu_entry_reset(uint32_t i);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user