Forráskód Böngészése

Fix Windows dialog folder titles

Same fix as in cf946e32ba0977a87bc5c7096c304538b4f42337, which was not done for the folder implementation.
Semphris 3 hónapja
szülő
commit
43b54b3d72
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      src/dialog/windows/SDL_windowsdialog.c

+ 2 - 2
src/dialog/windows/SDL_windowsdialog.c

@@ -439,7 +439,7 @@ void windows_ShowFolderDialog(void *ptr)
             title_len = 0;
         }
 
-        int title_wlen = MultiByteToWideChar(CP_UTF8, 0, title, title_len, NULL, 0);
+        int title_wlen = MultiByteToWideChar(CP_UTF8, 0, title, -1, NULL, 0);
 
         if (title_wlen < 0) {
             title_wlen = 0;
@@ -452,7 +452,7 @@ void windows_ShowFolderDialog(void *ptr)
             return;
         }
 
-        MultiByteToWideChar(CP_UTF8, 0, title, title_len, title_w, title_wlen);
+        MultiByteToWideChar(CP_UTF8, 0, title, -1, title_w, title_wlen);
     }
 
     wchar_t buffer[MAX_PATH];