summaryrefslogtreecommitdiff
path: root/src/editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/editor.c')
-rw-r--r--src/editor.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/editor.c b/src/editor.c
index 425dc64..c1d9463 100644
--- a/src/editor.c
+++ b/src/editor.c
@@ -236,8 +236,12 @@ void drawPreview(EditorCreateBlockState *state, int wx, int wy, int ww, int wh,
}
void loadTexture(EditorCreateBlockState *state) {
- nfdchar_t *outPath = NULL;
- nfdresult_t result = NFD_OpenDialog(NULL, NULL, &outPath);
+ nfdu8char_t *outPath;
+ nfdu8filteritem_t filters[1] = {{"Images", "png"}};
+ nfdopendialogu8args_t args = {0};
+ args.filterList = filters;
+ args.filterCount = 1;
+ nfdresult_t result = NFD_OpenDialogU8_With(&outPath, &args);
if (result == NFD_OKAY) {
if (!IsFileExtension(outPath, ".png")) {