From 07db5fdfccc9ee90c6b0a36aaad6b4f71b258cd3 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Mon, 14 Sep 2026 08:52:41 -0400 Subject: DragQueryFile A -> W Signed-off-by: Andrew Opalach --- src/window_win32.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/window_win32.c') diff --git a/src/window_win32.c b/src/window_win32.c index bf9ad87..e28d3d4 100644 --- a/src/window_win32.c +++ b/src/window_win32.c @@ -1316,15 +1316,19 @@ static void win32_handle_message(struct stl_window_win32 *w32, MSG *Message) #ifdef STELA_DRAG_AND_DROP case WM_DROPFILES: { HDROP Drop = (HDROP)Message->wParam; - str path = AL_STR_EMPTY; - u32 count = DragQueryFileA(Drop, 0xffffffff, NULL, 0); + wstr buf = AL_WSTR_EMPTY; + u32 count = DragQueryFileW(Drop, 0xffffffff, NULL, 0); for (u32 i = 0; i < count; i++) { - path.length = DragQueryFileA(Drop, i, NULL, 0); - path.alloc = al_str_reserve(&path, path.length + 1); - DragQueryFileA(Drop, i, path.data, path.alloc); - stl_window_send_drag_and_drop_event(&w32->w, &path); + buf.length = DragQueryFileW(Drop, i, NULL, 0); + buf.alloc = al_wstr_reserve(&buf, buf.length + 1); + DragQueryFileW(Drop, i, buf.data, buf.alloc); + str path = AL_STR_EMPTY; + if (al_str_from_wstr(&path, &buf)) { + stl_window_send_drag_and_drop_event(&w32->w, &path); + al_str_free(&path); + } } - al_str_free(&path); + al_wstr_free(&buf); DragFinish(Drop); break; } -- cgit v1.2.3-101-g0448