From 78e69a843fdaff53c4c4e451416110e296807f63 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Tue, 7 Aug 2018 13:14:25 -0500 Subject: [PATCH] micro patch to the nativefiledialogues library to mirror file type name folks with 'hide extensions for known file types' on windows weren't seeing any entries in thier drop-down lists for file types. --- Engine/lib/nativeFileDialogs/nfd_win.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Engine/lib/nativeFileDialogs/nfd_win.cpp b/Engine/lib/nativeFileDialogs/nfd_win.cpp index a73fd8a46..1187fc84b 100644 --- a/Engine/lib/nativeFileDialogs/nfd_win.cpp +++ b/Engine/lib/nativeFileDialogs/nfd_win.cpp @@ -183,7 +183,7 @@ static nfdresult_t AddFiltersToDialog( ::IFileDialog *fileOpenDialog, const char /* end of filter -- add it to specList */ // Empty filter name -- Windows describes them by extension. - specList[specIdx].pszName = EMPTY_WSTR; + CopyNFDCharToWChar(specbuf, (wchar_t**)&specList[specIdx].pszName); CopyNFDCharToWChar( specbuf, (wchar_t**)&specList[specIdx].pszSpec ); memset( specbuf, 0, sizeof(char)*NFD_MAX_STRLEN ); @@ -203,7 +203,7 @@ static nfdresult_t AddFiltersToDialog( ::IFileDialog *fileOpenDialog, const char /* Add wildcard */ specList[specIdx].pszSpec = WILDCARD; - specList[specIdx].pszName = EMPTY_WSTR; + specList[specIdx].pszName = WILDCARD; fileOpenDialog->SetFileTypes( filterCount+1, specList );