diff options
author | Kovensky <diogomfranco@gmail.com> | 2013-03-23 16:38:22 -0300 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-03-23 21:04:59 +0100 |
commit | 4be6ff5ee33bf1c0fabd00d8f5280e2be222adea (patch) | |
tree | 29de8fe2dd64249a4c59380a6b77ac9fb82d1482 /video/out | |
parent | 746b5e6027754853d2f33f764f0e5ffd75f3bd93 (diff) | |
download | mpv-4be6ff5ee33bf1c0fabd00d8f5280e2be222adea.tar.bz2 mpv-4be6ff5ee33bf1c0fabd00d8f5280e2be222adea.tar.xz |
w32_common: Cygwin64 fixes
Good news: MPV worked fine even without the fixes, but pointer size
mismatch warnings aren't the nicest things to leave lying around.
Fix macro that assumed HWND is uint32_t-sized.
Win64 is also a special butterfly and is an LLP64 platform on amd64
CPUs, while all the other amd64 platforms are LP64. Cygwin decided to go
with the other platforms, and thus sizeof(long) != sizeof(int), and in
cygwin's windows headers LONG is int-sized. Fix an mp_msg that assumed
LONG is long.
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/w32_common.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c index 0a96af513a..f828f58a1a 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -33,7 +33,7 @@ #include "osdep/io.h" #include "talloc.h" -#define WIN_ID_TO_HWND(x) ((HWND)(uint32_t)(x)) +#define WIN_ID_TO_HWND(x) ((HWND)(intptr_t)(x)) static const wchar_t classname[] = L"mpv"; @@ -458,8 +458,9 @@ static int reinit_window_state(struct vo *vo) SetWindowLong(w32->window, GWL_STYLE, style); add_window_borders(w32->window, &r); - mp_msg(MSGT_VO, MSGL_V, "[vo] reset window bounds: %ld:%ld:%ld:%ld\n", - r.left, r.top, r.right - r.left, r.bottom - r.top); + mp_msg(MSGT_VO, MSGL_V, "[vo] reset window bounds: %d:%d:%d:%d\n", + (int) r.left, (int) r.top, (int)(r.right - r.left), + (int)(r.bottom - r.top)); SetWindowPos(w32->window, layer, r.left, r.top, r.right - r.left, r.bottom - r.top, SWP_FRAMECHANGED); |