Răsfoiți Sursa

Merge pull request #2270 from Azaezel/NDFnoHide

micro patch to the nativefiledialogues library to mirror file type name
Areloch 7 ani în urmă
părinte
comite
0b9ac45747
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      Engine/lib/nativeFileDialogs/nfd_win.cpp

+ 2 - 2
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 */
             /* end of filter -- add it to specList */
 
 
             // Empty filter name -- Windows describes them by extension.            
             // 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 );
             CopyNFDCharToWChar( specbuf, (wchar_t**)&specList[specIdx].pszSpec );
                         
                         
             memset( specbuf, 0, sizeof(char)*NFD_MAX_STRLEN );
             memset( specbuf, 0, sizeof(char)*NFD_MAX_STRLEN );
@@ -203,7 +203,7 @@ static nfdresult_t AddFiltersToDialog( ::IFileDialog *fileOpenDialog, const char
 
 
     /* Add wildcard */
     /* Add wildcard */
     specList[specIdx].pszSpec = WILDCARD;
     specList[specIdx].pszSpec = WILDCARD;
-    specList[specIdx].pszName = EMPTY_WSTR;
+    specList[specIdx].pszName = WILDCARD;
     
     
     fileOpenDialog->SetFileTypes( filterCount+1, specList );
     fileOpenDialog->SetFileTypes( filterCount+1, specList );