summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_directx.c6
-rw-r--r--libvo/w32_common.c14
2 files changed, 11 insertions, 9 deletions
diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c
index 419c0f2b94..d504e23567 100644
--- a/libvo/vo_directx.c
+++ b/libvo/vo_directx.c
@@ -276,7 +276,7 @@ static uint32_t Directx_CreateOverlay(uint32_t imgfmt)
case DDERR_OUTOFVIDEOMEMORY:
{mp_msg(MSGT_VO, MSGL_ERR,"not enough video memory\n");break;}
default:
- mp_msg(MSGT_VO, MSGL_ERR,"create surface failed with 0x%x\n",ddrval);
+ mp_msg(MSGT_VO, MSGL_ERR,"create surface failed with 0x%xu\n",(unsigned)ddrval);
}
return 1;
}
@@ -588,7 +588,7 @@ static uint32_t Directx_ManageDisplay(void)
// we should try upping the destination size a bit, or
// perhaps shrinking the source size
mp_msg(MSGT_VO, MSGL_ERR ,"<vo_directx><ERROR>UpdateOverlay failed\n" );
- mp_msg(MSGT_VO, MSGL_ERR ,"<vo_directx><ERROR>Overlay:x1:%i,y1:%i,x2:%i,y2:%i,w:%i,h:%i\n",rd.left,rd.top,rd.right,rd.bottom,rd.right - rd.left,rd.bottom - rd.top );
+ mp_msg(MSGT_VO, MSGL_ERR ,"<vo_directx><ERROR>Overlay:x1:%li,y1:%li,x2:%li,y2:%li,w:%li,h:%li\n",rd.left,rd.top,rd.right,rd.bottom,rd.right - rd.left,rd.bottom - rd.top );
mp_msg(MSGT_VO, MSGL_ERR ,"<vo_directx><ERROR>");
switch (ddrval)
{
@@ -618,7 +618,7 @@ static uint32_t Directx_ManageDisplay(void)
break;
}
default:
- mp_msg(MSGT_VO, MSGL_ERR ," 0x%x\n",ddrval);
+ mp_msg(MSGT_VO, MSGL_ERR ," 0x%xu\n",(unsigned)ddrval);
}
/*ok we can't do anything about it -> hide overlay*/
if(ddrval != DD_OK)
diff --git a/libvo/w32_common.c b/libvo/w32_common.c
index a8a59d02c9..475327ce5c 100644
--- a/libvo/w32_common.c
+++ b/libvo/w32_common.c
@@ -41,6 +41,8 @@
#define MONITOR_DEFAULTTOPRIMARY 1
#endif
+#define WIN_ID_TO_HWND(x) ((HWND)(uint32_t)(x))
+
static const char classname[] = "MPlayer - The Movie Player";
int vo_vm = 0;
@@ -116,7 +118,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l
break;
case WM_WINDOWPOSCHANGING:
if (vo_keepaspect && !vo_fs && WinID < 0) {
- WINDOWPOS *wpos = lParam;
+ WINDOWPOS *wpos = (WINDOWPOS*)lParam;
int xborder, yborder;
r.left = r.top = 0;
r.right = wpos->cx;
@@ -232,10 +234,10 @@ int vo_w32_check_events(void) {
vo_dx = p.x; vo_dy = p.y;
event_flags |= VO_EVENT_MOVE;
}
- res = GetClientRect(WinID, &r);
+ res = GetClientRect(WIN_ID_TO_HWND(WinID), &r);
if (res && (r.right != vo_dwidth || r.bottom != vo_dheight))
MoveWindow(vo_window, 0, 0, r.right, r.bottom, FALSE);
- if (!IsWindow(WinID))
+ if (!IsWindow(WIN_ID_TO_HWND(WinID)))
// Window has probably been closed, e.g. due to program crash
mplayer_put_key(KEY_CLOSE_WIN);
}
@@ -514,11 +516,11 @@ int vo_w32_init(void) {
if (WinID >= 0)
{
RECT r;
- GetClientRect(WinID, &r);
+ GetClientRect(WIN_ID_TO_HWND(WinID), &r);
vo_dwidth = r.right; vo_dheight = r.bottom;
vo_window = CreateWindowEx(WS_EX_NOPARENTNOTIFY, classname, classname,
- WS_CHILD | WS_VISIBLE,
- 0, 0, vo_dwidth, vo_dheight, WinID, 0, hInstance, 0);
+ WS_CHILD | WS_VISIBLE, 0, 0, vo_dwidth, vo_dheight,
+ WIN_ID_TO_HWND(WinID), 0, hInstance, 0);
EnableWindow(vo_window, 0);
} else
vo_window = CreateWindowEx(0, classname, classname,