[nk] implement extension filtering

This commit is contained in:
radius 2016-06-05 22:32:07 -05:00
parent 2667289d45
commit d8890b486a
2 changed files with 5 additions and 5 deletions

View File

@ -57,7 +57,7 @@ static void nk_menu_main(nk_menu_handle_t *nk)
if (nk->window[NK_WND_SETTINGS].open)
nk_wnd_settings(nk);
if (nk->window[NK_WND_FILE_PICKER].open)
nk_wnd_file_picker(nk, NULL, NULL, NULL);
nk_wnd_file_picker(nk, settings->directory.menu_content, NULL, ".zip");
if (nk->window[NK_WND_SHADER_PARAMETERS].open)
nk_wnd_shader_parameters(nk);
if (nk->window[NK_WND_MAIN].open)

View File

@ -81,7 +81,7 @@ bool nk_wnd_file_picker(nk_menu_handle_t *nk, const char* in, const char* out, c
{
RARCH_LOG("beep\n");
strlcpy(path, in, sizeof(path));
files = dir_list_new(path, NULL, true, true);
files = dir_list_new(path, filter, true, true);
}
if (!assets_loaded)
@ -100,7 +100,7 @@ bool nk_wnd_file_picker(nk_menu_handle_t *nk, const char* in, const char* out, c
{
fill_pathname_join(path, "/",
"", sizeof(path));
files = dir_list_new(path, NULL, true, true);
files = dir_list_new(path, filter, true, true);
}
}
else
@ -112,7 +112,7 @@ bool nk_wnd_file_picker(nk_menu_handle_t *nk, const char* in, const char* out, c
{
fill_pathname_join(path, drives->list[i].path,
"", sizeof(path));
files = dir_list_new(path, NULL, true, true);
files = dir_list_new(path, filter, true, true);
}
}
}
@ -128,7 +128,7 @@ bool nk_wnd_file_picker(nk_menu_handle_t *nk, const char* in, const char* out, c
{
strlcpy (path, files->elems[i].data, sizeof(path));
if (path_is_directory (path))
files = dir_list_new(path, NULL, true, true);
files = dir_list_new(path, filter, true, true);
else
RARCH_LOG ("File: %s selected\n", path);
}