[vlc-commits] vout:win32: handle VOUT_DISPLAY_CHANGE_DISPLAY_SIZE on Winstore builds
Steve Lhomme
git at videolan.org
Mon Apr 1 16:50:20 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Mar 25 16:04:29 2019 +0100| [1f9cb991c675b238cdab0a5d360f4e8f3994206e] | committer: Steve Lhomme
vout:win32: handle VOUT_DISPLAY_CHANGE_DISPLAY_SIZE on Winstore builds
We need to place the video if the display size changed.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1f9cb991c675b238cdab0a5d360f4e8f3994206e
---
modules/video_output/win32/common.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index 1effecf2d0..8e742a0e88 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -437,27 +437,27 @@ int CommonControl(vout_display_t *vd, vout_display_sys_win32_t *sys, int query,
UpdateRects(vd, sys, true);
return VLC_SUCCESS;
}
-#if !VLC_WINSTORE_APP
case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE: /* const vout_display_cfg_t *p_cfg */
{ /* Update dimensions */
- const vout_display_cfg_t *cfg = va_arg(args, const vout_display_cfg_t *);
- RECT rect_window = {
- .top = 0,
- .left = 0,
- .right = cfg->display.width,
- .bottom = cfg->display.height,
- };
-
- if (!cfg->is_fullscreen && !sys->b_windowless) {
+ sys->vdcfg = *va_arg(args, const vout_display_cfg_t *);
+#if !VLC_WINSTORE_APP
+ if (!sys->vdcfg.is_fullscreen && !sys->b_windowless) {
+ RECT rect_window = {
+ .top = 0,
+ .left = 0,
+ .right = sys->vdcfg.display.width,
+ .bottom = sys->vdcfg.display.height,
+ };
AdjustWindowRect(&rect_window, EventThreadGetWindowStyle(sys->event), 0);
SetWindowPos(sys->hwnd, 0, 0, 0,
RECTWidth(rect_window),
RECTHeight(rect_window), SWP_NOMOVE);
}
- sys->vdcfg = *cfg;
+#endif /* !VLC_WINSTORE_APP */
UpdateRects(vd, sys, false);
return VLC_SUCCESS;
}
+#if !VLC_WINSTORE_APP
case VOUT_DISPLAY_CHANGE_WINDOW_STATE: { /* unsigned state */
const unsigned state = va_arg(args, unsigned);
const bool is_on_top = (state & VOUT_WINDOW_STATE_ABOVE) != 0;
More information about the vlc-commits
mailing list