(MSVC) Buildfixes

This commit is contained in:
twinaphex 2017-09-10 22:38:03 +02:00
parent b079cc8927
commit 08e3bb2122
7 changed files with 51 additions and 46 deletions

View File

@ -32,10 +32,12 @@
static int action_info_default(unsigned type, const char *label)
{
menu_displaylist_info_t info = {0};
menu_displaylist_info_t info;
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
size_t selection = menu_navigation_get_selection();
menu_displaylist_info_init(&info);
info.list = menu_stack;
info.directory_ptr = selection;
info.enum_idx = MENU_ENUM_LABEL_INFO_SCREEN;

View File

@ -119,13 +119,13 @@ int generic_action_ok_displaylist_push(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx,
unsigned action_type)
{
menu_displaylist_info_t info;
char new_path_tmp[PATH_MAX_LENGTH];
char tmp[PATH_MAX_LENGTH];
char parent_dir[PATH_MAX_LENGTH];
char action_path[PATH_MAX_LENGTH];
char lpl_basename[PATH_MAX_LENGTH];
enum menu_displaylist_ctl_state dl_type = DISPLAYLIST_NONE;
menu_displaylist_info_t info = {0};
const char *menu_label = NULL;
const char *menu_path = NULL;
const char *content_path = NULL;
@ -136,6 +136,8 @@ int generic_action_ok_displaylist_push(const char *path,
settings_t *settings = config_get_ptr();
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
menu_displaylist_info_init(&info);
if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu))
return menu_cbs_exit();
@ -1874,8 +1876,8 @@ static void menu_input_st_string_cb_rename_entry(void *userdata,
playlist_t *tmp_playlist = NULL;
size_t new_selection_ptr = menu_input_dialog_get_kb_idx();
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_GET, &tmp_playlist);
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_GET, &tmp_playlist);
if (tmp_playlist)
{
playlist_update(tmp_playlist,

View File

@ -260,10 +260,12 @@ end:
bool generic_menu_init_list(void *data)
{
menu_displaylist_info_t info = {0};
menu_displaylist_info_t info;
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
menu_displaylist_info_init(&info);
strlcpy(info.label,
msg_hash_to_str(MENU_ENUM_LABEL_MAIN_MENU), sizeof(info.label));
info.enum_idx = MENU_ENUM_LABEL_MAIN_MENU;

View File

@ -4037,16 +4037,18 @@ static bool menu_displaylist_push_internal(
bool menu_displaylist_push(menu_displaylist_ctx_entry_t *entry)
{
menu_displaylist_info_t info;
menu_file_list_cbs_t *cbs = NULL;
const char *path = NULL;
const char *label = NULL;
unsigned type = 0;
enum msg_hash_enums enum_idx = MSG_UNKNOWN;
menu_displaylist_info_t info = {0};
if (!entry)
return false;
menu_displaylist_info_init(&info);
menu_entries_get_last_stack(&path, &label, &type, &enum_idx, NULL);
info.list = entry->list;
@ -4225,6 +4227,32 @@ bool menu_displaylist_process(menu_displaylist_info_t *info)
return true;
}
void menu_displaylist_info_init(menu_displaylist_info_t *info)
{
info->enum_idx = MSG_UNKNOWN;
info->need_sort = false;
info->need_refresh = false;
info->need_entries_refresh = false;
info->need_push = false;
info->need_clear = false;
info->push_builtin_cores = false;
info->download_core = false;
info->need_navigation_clear = false;
info->path[0] = '\0';
info->path_b[0] = '\0';
info->path_c[0] = '\0';
info->exts[0] = '\0';
info->label[0] = '\0';
info->type = 0;
info->type_default = 0;
info->flags = 0;
info->label_hash = 0;
info->directory_ptr = 0;
info->list = NULL;
info->menu_list = NULL;
info->setting = NULL;
}
bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
{
size_t i;

View File

@ -219,6 +219,8 @@ bool menu_displaylist_process(menu_displaylist_info_t *info);
bool menu_displaylist_push(menu_displaylist_ctx_entry_t *entry);
void menu_displaylist_info_init(menu_displaylist_info_t *info);
bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data);
#ifdef HAVE_NETWORKING
void netplay_refresh_rooms_menu(file_list_t *list);

View File

@ -767,28 +767,13 @@ int menu_action_handle_setting(rarch_setting_t *setting,
const char *name = setting->name;
size_t selection = menu_navigation_get_selection();
info.enum_idx = MSG_UNKNOWN;
info.need_sort = false;
info.need_refresh = false;
info.need_entries_refresh = false;
info.need_push = false;
info.need_clear = false;
info.push_builtin_cores = false;
info.download_core = false;
info.need_navigation_clear = false;
menu_displaylist_info_init(&info);
strlcpy(info.path, setting->default_value.string, sizeof(info.path));
info.path_b[0] = '\0';
info.path_c[0] = '\0';
info.exts[0] = '\0';
strlcpy(info.label, name, sizeof(info.label));
info.type = type;
info.type_default = 0;
info.flags = 0;
info.label_hash = 0;
info.directory_ptr = selection;
info.list = menu_stack;
info.menu_list = NULL;
info.setting = NULL;
if (menu_displaylist_ctl(DISPLAYLIST_GENERIC, &info))
menu_displaylist_process(&info);
@ -1684,31 +1669,13 @@ void general_write_handler(void *data)
menu_displaylist_info_t info;
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
info.enum_idx = MENU_ENUM_LABEL_HELP;
info.need_sort = false;
info.need_refresh = false;
info.need_entries_refresh = false;
info.need_push = false;
info.need_clear = false;
info.push_builtin_cores = false;
info.download_core = false;
info.need_navigation_clear = false;
info.path[0] = '\0';
info.path_b[0] = '\0';
info.path_c[0] = '\0';
info.exts[0] = '\0';
menu_displaylist_info_init(&info);
info.enum_idx = MENU_ENUM_LABEL_HELP;
strlcpy(info.label,
msg_hash_to_str(MENU_ENUM_LABEL_HELP),
sizeof(info.label));
info.type = 0;
info.type_default = 0;
info.flags = 0;
info.label_hash = 0;
info.directory_ptr = 0;
info.list = menu_stack;
info.menu_list = NULL;
info.setting = NULL;
info.list = menu_stack;
if (menu_displaylist_ctl(DISPLAYLIST_GENERIC, &info))
menu_displaylist_process(&info);

View File

@ -82,13 +82,15 @@ static int menu_input_key_bind_set_mode_common(
enum menu_input_binds_ctl_state state,
rarch_setting_t *setting)
{
menu_displaylist_info_t info;
unsigned bind_type = 0;
menu_displaylist_info_t info = {0};
struct retro_keybind *keybind = NULL;
unsigned index_offset = setting->index_offset;
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
size_t selection = menu_navigation_get_selection();
menu_displaylist_info_init(&info);
switch (state)
{
case MENU_INPUT_BINDS_CTL_BIND_SINGLE: