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.
This commit is contained in:
Kovensky 2013-03-23 16:38:22 -03:00 committed by wm4
parent 746b5e6027
commit 4be6ff5ee3
1 changed files with 4 additions and 3 deletions

View File

@ -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);