From c990a57359811e1578587c63d3fca653510be2d7 Mon Sep 17 00:00:00 2001 From: allanin Date: Sun, 18 Jun 2017 05:57:08 +0000 Subject: [PATCH] Fixing wrong settings in Nuklear --- menu/drivers/nuklear.c | 8 ++++---- menu/drivers/nuklear/nk_wnd_file_picker.c | 8 ++++---- menu/drivers/nuklear/nk_wnd_main.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/menu/drivers/nuklear.c b/menu/drivers/nuklear.c index 0aac1bf9b6..d87f5e4c8b 100644 --- a/menu/drivers/nuklear.c +++ b/menu/drivers/nuklear.c @@ -166,7 +166,7 @@ static void *nk_menu_init(void **userdata, bool video_is_threaded) goto error; *userdata = nk; - fill_pathname_join(nk->assets_directory, settings->directory.assets, + fill_pathname_join(nk->assets_directory, settings->paths.directory_assets, "nuklear", sizeof(nk->assets_directory)); nk_menu_init_device(nk); @@ -430,15 +430,15 @@ static void nk_menu_context_reset(void *data, bool is_threaded) if (!nk || !settings) return; - fill_pathname_join(iconpath, settings->directory.assets, + fill_pathname_join(iconpath, settings->paths.directory_assets, "nuklear", sizeof(iconpath)); fill_pathname_slash(iconpath, sizeof(iconpath)); nk_menu_init_device(nk); nk_menu_context_load_textures(nk, iconpath); - if (path_file_exists(settings->path.menu_wallpaper)) - task_push_image_load(settings->path.menu_wallpaper, + if (path_file_exists(settings->paths.path_menu_wallpaper)) + task_push_image_load(settings->paths.path_menu_wallpaper, menu_display_handle_wallpaper_upload, NULL); } diff --git a/menu/drivers/nuklear/nk_wnd_file_picker.c b/menu/drivers/nuklear/nk_wnd_file_picker.c index 965da78fb3..0ef00ee077 100644 --- a/menu/drivers/nuklear/nk_wnd_file_picker.c +++ b/menu/drivers/nuklear/nk_wnd_file_picker.c @@ -81,7 +81,7 @@ bool nk_wnd_file_picker(nk_menu_handle_t *nk, char* title, char* in, char* out, if (!string_is_empty(in) && string_is_empty(path)) { strlcpy(path, in, sizeof(path)); - files = dir_list_new(path, filter, true, settings->show_hidden_files, true, false); + files = dir_list_new(path, filter, true, settings->bools.show_hidden_files, true, false); } if (!assets_loaded) @@ -100,7 +100,7 @@ bool nk_wnd_file_picker(nk_menu_handle_t *nk, char* title, char* in, char* out, { fill_pathname_join(path, "/", "", sizeof(path)); - files = dir_list_new(path, filter, true, settings->show_hidden_files, true, false); + files = dir_list_new(path, filter, true, settings->bools.show_hidden_files, true, false); } } else @@ -112,7 +112,7 @@ bool nk_wnd_file_picker(nk_menu_handle_t *nk, char* title, char* in, char* out, { fill_pathname_join(path, drives->list[i].path, "", sizeof(path)); - files = dir_list_new(path, filter, true, settings->show_hidden_files, true, false); + files = dir_list_new(path, filter, true, settings->bools.show_hidden_files, true, false); } } } @@ -128,7 +128,7 @@ bool nk_wnd_file_picker(nk_menu_handle_t *nk, char* title, char* in, char* out, { strlcpy (path, files->elems[i].data, sizeof(path)); if (path_is_directory (path)) - files = dir_list_new(path, filter, true, settings->show_hidden_files, true, false); + files = dir_list_new(path, filter, true, settings->bools.show_hidden_files, true, false); } } } diff --git a/menu/drivers/nuklear/nk_wnd_main.c b/menu/drivers/nuklear/nk_wnd_main.c index bd78f3c408..fdc7d86de2 100644 --- a/menu/drivers/nuklear/nk_wnd_main.c +++ b/menu/drivers/nuklear/nk_wnd_main.c @@ -84,7 +84,7 @@ void nk_wnd_main(nk_menu_handle_t *nk, const char* title) out = core; strlcpy(picker_title, "Select core", sizeof(picker_title)); strlcpy(picker_filter, ".dll", sizeof(picker_filter)); - picker_startup_dir = settings->directory.libretro; + picker_startup_dir = settings->paths.directory_libretro; nk->window[NK_WND_FILE_PICKER].open = true; } nk_layout_row_dynamic(ctx, 30, 1); @@ -96,7 +96,7 @@ void nk_wnd_main(nk_menu_handle_t *nk, const char* title) out = content; strlcpy(picker_title, "Select content", sizeof(picker_title)); strlcpy(picker_filter, ".zip", sizeof(picker_filter)); - picker_startup_dir = settings->directory.menu_content; + picker_startup_dir = settings->paths.directory_menu_content; nk->window[NK_WND_FILE_PICKER].open = true; } }