summaryrefslogtreecommitdiffstats
path: root/video/out/w32_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/w32_common.c')
-rw-r--r--video/out/w32_common.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c
index 6ef788bd0b..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);
@@ -542,6 +543,11 @@ int vo_w32_config(struct vo *vo, uint32_t width, uint32_t height,
w32->prev_width = vo->dwidth = width;
w32->prev_height = vo->dheight = height;
}
+ } else {
+ RECT r;
+ GetClientRect(w32->window, &r);
+ vo->dwidth = r.right;
+ vo->dheight = r.bottom;
}
vo->opts->fs = flags & VOFLAG_FULLSCREEN;