From 43b54b3d721003455021ac61f98eb014633a19da Mon Sep 17 00:00:00 2001 From: Semphris Date: Sat, 18 Jan 2025 18:37:49 -0500 Subject: [PATCH] Fix Windows dialog folder titles Same fix as in cf946e32ba0977a87bc5c7096c304538b4f42337, which was not done for the folder implementation. --- src/dialog/windows/SDL_windowsdialog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dialog/windows/SDL_windowsdialog.c b/src/dialog/windows/SDL_windowsdialog.c index fc25a194f..b52e8b3ba 100644 --- a/src/dialog/windows/SDL_windowsdialog.c +++ b/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];