Skip to content

Commit 983ce14

Browse files
committed
video/out/w32_common: cast wid to uint32_t
Sometimes negative wids can cause unexpected behavior, so we can zero out all 32 high bits of wid before passing it to WinAPI. Fixes: mpv-player#10189.
1 parent 13bad43 commit 983ce14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

video/out/w32_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1512,7 +1512,7 @@ static void *gui_thread(void *ptr)
15121512
if (w32->api.pImmDisableIME)
15131513
w32->api.pImmDisableIME(0);
15141514

1515-
w32->parent = (HWND)(intptr_t)(w32->opts->WinID);
1515+
w32->parent = (HWND)(intptr_t)(uint32_t)(w32->opts->WinID);
15161516

15171517
ATOM cls = get_window_class();
15181518
if (w32->parent) {

0 commit comments

Comments
 (0)