Commit 92b7ae98 authored by Gildas Bazin's avatar Gildas Bazin

* modules/video_output/directx: in embedded mode, we now use the current...

* modules/video_output/directx: in embedded mode, we now use the current monitor when switching to fullscreen.
parent e73ef76c
...@@ -556,6 +556,20 @@ static int Manage( vout_thread_t *p_vout ) ...@@ -556,6 +556,20 @@ static int Manage( vout_thread_t *p_vout )
int i_style = WS_CLIPCHILDREN | WS_VISIBLE; int i_style = WS_CLIPCHILDREN | WS_VISIBLE;
SetWindowLong( hwnd, GWL_STYLE, i_style ); SetWindowLong( hwnd, GWL_STYLE, i_style );
if( p_vout->p_sys->hparent )
{
/* Retrieve current window position so fullscreen will happen
* on the right screen */
POINT point = {0,0};
RECT rect;
ClientToScreen( p_vout->p_sys->hwnd, &point );
GetClientRect( p_vout->p_sys->hwnd, &rect );
SetWindowPos( hwnd, 0, point.x, point.y,
rect.right, rect.bottom,
SWP_NOZORDER|SWP_FRAMECHANGED );
GetWindowPlacement( hwnd, &window_placement );
}
/* Maximize window */ /* Maximize window */
window_placement.showCmd = SW_SHOWMAXIMIZED; window_placement.showCmd = SW_SHOWMAXIMIZED;
SetWindowPlacement( hwnd, &window_placement ); SetWindowPlacement( hwnd, &window_placement );
......
...@@ -322,6 +322,20 @@ static int Manage( vout_thread_t *p_vout ) ...@@ -322,6 +322,20 @@ static int Manage( vout_thread_t *p_vout )
int i_style = WS_CLIPCHILDREN | WS_VISIBLE; int i_style = WS_CLIPCHILDREN | WS_VISIBLE;
SetWindowLong( hwnd, GWL_STYLE, i_style ); SetWindowLong( hwnd, GWL_STYLE, i_style );
if( p_vout->p_sys->hparent )
{
/* Retrieve current window position so fullscreen will happen
* on the right screen */
POINT point = {0,0};
RECT rect;
ClientToScreen( p_vout->p_sys->hwnd, &point );
GetClientRect( p_vout->p_sys->hwnd, &rect );
SetWindowPos( hwnd, 0, point.x, point.y,
rect.right, rect.bottom,
SWP_NOZORDER|SWP_FRAMECHANGED );
GetWindowPlacement( hwnd, &window_placement );
}
/* Maximize window */ /* Maximize window */
window_placement.showCmd = SW_SHOWMAXIMIZED; window_placement.showCmd = SW_SHOWMAXIMIZED;
SetWindowPlacement( hwnd, &window_placement ); SetWindowPlacement( hwnd, &window_placement );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment