Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
d0bc42f4
Commit
d0bc42f4
authored
Nov 10, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Merged trunk changesets 9258 and 9266 to 0.8.1 branch.
parent
d92fe9d2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
117 additions
and
81 deletions
+117
-81
modules/video_output/directx/directx.c
modules/video_output/directx/directx.c
+51
-42
modules/video_output/directx/events.c
modules/video_output/directx/events.c
+14
-7
modules/video_output/directx/glwin32.c
modules/video_output/directx/glwin32.c
+51
-32
modules/video_output/directx/vout.h
modules/video_output/directx/vout.h
+1
-0
No files found.
modules/video_output/directx/directx.c
View file @
d0bc42f4
...
@@ -199,7 +199,7 @@ static int OpenVideo( vlc_object_t *p_this )
...
@@ -199,7 +199,7 @@ static int OpenVideo( vlc_object_t *p_this )
p_vout
->
p_sys
->
p_current_surface
=
NULL
;
p_vout
->
p_sys
->
p_current_surface
=
NULL
;
p_vout
->
p_sys
->
p_clipper
=
NULL
;
p_vout
->
p_sys
->
p_clipper
=
NULL
;
p_vout
->
p_sys
->
hwnd
=
p_vout
->
p_sys
->
hvideownd
=
NULL
;
p_vout
->
p_sys
->
hwnd
=
p_vout
->
p_sys
->
hvideownd
=
NULL
;
p_vout
->
p_sys
->
hparent
=
NULL
;
p_vout
->
p_sys
->
hparent
=
p_vout
->
p_sys
->
hfswnd
=
NULL
;
p_vout
->
p_sys
->
i_changes
=
0
;
p_vout
->
p_sys
->
i_changes
=
0
;
p_vout
->
p_sys
->
b_wallpaper
=
0
;
p_vout
->
p_sys
->
b_wallpaper
=
0
;
vlc_mutex_init
(
p_vout
,
&
p_vout
->
p_sys
->
lock
);
vlc_mutex_init
(
p_vout
,
&
p_vout
->
p_sys
->
lock
);
...
@@ -541,73 +541,82 @@ static int Manage( vout_thread_t *p_vout )
...
@@ -541,73 +541,82 @@ static int Manage( vout_thread_t *p_vout )
if
(
p_vout
->
i_changes
&
VOUT_FULLSCREEN_CHANGE
if
(
p_vout
->
i_changes
&
VOUT_FULLSCREEN_CHANGE
||
p_vout
->
p_sys
->
i_changes
&
VOUT_FULLSCREEN_CHANGE
)
||
p_vout
->
p_sys
->
i_changes
&
VOUT_FULLSCREEN_CHANGE
)
{
{
int
i_style
=
0
;
vlc_value_t
val
;
vlc_value_t
val
;
HWND
hwnd
=
(
p_vout
->
p_sys
->
hparent
&&
p_vout
->
p_sys
->
hfswnd
)
?
p_vout
->
p_sys
->
hfswnd
:
p_vout
->
p_sys
->
hwnd
;
p_vout
->
b_fullscreen
=
!
p_vout
->
b_fullscreen
;
p_vout
->
b_fullscreen
=
!
p_vout
->
b_fullscreen
;
/* We need to switch between Maximized and Normal sized window */
/* We need to switch between Maximized and Normal sized window */
window_placement
.
length
=
sizeof
(
WINDOWPLACEMENT
);
window_placement
.
length
=
sizeof
(
WINDOWPLACEMENT
);
GetWindowPlacement
(
hwnd
,
&
window_placement
);
if
(
p_vout
->
b_fullscreen
)
if
(
p_vout
->
b_fullscreen
)
{
{
/* Change window style, no borders and no title bar */
int
i_style
=
WS_CLIPCHILDREN
|
WS_VISIBLE
;
SetWindowLong
(
hwnd
,
GWL_STYLE
,
i_style
);
if
(
p_vout
->
p_sys
->
hparent
)
if
(
p_vout
->
p_sys
->
hparent
)
{
{
POINT
point
;
/* Retrieve current window position so fullscreen will happen
* on the right screen */
/* Retrieve the window position */
POINT
point
=
{
0
,
0
};
point
.
x
=
point
.
y
=
0
;
RECT
rect
;
ClientToScreen
(
p_vout
->
p_sys
->
hwnd
,
&
point
);
ClientToScreen
(
p_vout
->
p_sys
->
hwnd
,
&
point
);
SetParent
(
p_vout
->
p_sys
->
hwnd
,
GetDesktopWindow
()
);
GetClientRect
(
p_vout
->
p_sys
->
hwnd
,
&
rect
);
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
point
.
x
,
point
.
y
,
0
,
0
,
SetWindowPos
(
hwnd
,
0
,
point
.
x
,
point
.
y
,
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
rect
.
right
,
rect
.
bottom
,
SetForegroundWindow
(
p_vout
->
p_sys
->
hwnd
);
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
GetWindowPlacement
(
hwnd
,
&
window_placement
);
}
}
/* Maximized window */
/* Maximize window */
GetWindowPlacement
(
p_vout
->
p_sys
->
hwnd
,
&
window_placement
);
window_placement
.
showCmd
=
SW_SHOWMAXIMIZED
;
window_placement
.
showCmd
=
SW_SHOWMAXIMIZED
;
/* Change window style, no borders and no title bar */
SetWindowPlacement
(
hwnd
,
&
window_placement
);
i_style
=
WS_CLIPCHILDREN
|
WS_VISIBLE
|
WS_POPUP
;
SetWindowPos
(
hwnd
,
0
,
0
,
0
,
0
,
0
,
}
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
else
{
if
(
p_vout
->
p_sys
->
hparent
)
if
(
p_vout
->
p_sys
->
hparent
)
{
{
SetParent
(
p_vout
->
p_sys
->
hwnd
,
p_vout
->
p_sys
->
hparent
);
RECT
rect
;
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
0
,
0
,
0
,
0
,
GetClientRect
(
hwnd
,
&
rect
);
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
SetParent
(
p_vout
->
p_sys
->
hwnd
,
hwnd
);
i_style
=
WS_CLIPCHILDREN
|
WS_VISIBLE
|
WS_CHILD
;
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
0
,
0
,
SetForegroundWindow
(
p_vout
->
p_sys
->
hparent
);
rect
.
right
,
rect
.
bottom
,
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
}
SetForegroundWindow
(
hwnd
);
}
}
else
else
{
{
i_style
=
WS_CLIPCHILDREN
|
WS_OVERLAPPEDWINDOW
|
/* Change window style, no borders and no title bar */
int
i_style
=
WS_CLIPCHILDREN
|
WS_OVERLAPPEDWINDOW
|
WS_SIZEBOX
|
WS_VISIBLE
;
WS_SIZEBOX
|
WS_VISIBLE
;
}
SetWindowLong
(
hwnd
,
GWL_STYLE
,
i_style
);
/* Normal window */
/* Normal window */
GetWindowPlacement
(
p_vout
->
p_sys
->
hwnd
,
&
window_placement
);
window_placement
.
showCmd
=
SW_SHOWNORMAL
;
window_placement
.
showCmd
=
SW_SHOWNORMAL
;
SetWindowPlacement
(
hwnd
,
&
window_placement
);
/* Make sure the mouse cursor is displayed */
SetWindowPos
(
hwnd
,
0
,
0
,
0
,
0
,
0
,
PostMessage
(
p_vout
->
p_sys
->
hwnd
,
WM_VLC_SHOW_MOUSE
,
0
,
0
);
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
}
if
(
p_vout
->
p_sys
->
hparent
)
if
(
p_vout
->
p_sys
->
hparent
)
{
{
ShowWindow
(
p_vout
->
p_sys
->
hwnd
,
SW_HIDE
);
RECT
rect
;
SetWindowLong
(
p_vout
->
p_sys
->
hwnd
,
GWL_EXSTYLE
,
GetClientRect
(
p_vout
->
p_sys
->
hparent
,
&
rect
);
!
p_vout
->
b_fullscreen
?
SetParent
(
p_vout
->
p_sys
->
hwnd
,
p_vout
->
p_sys
->
hparent
);
WS_EX_NOPARENTNOTIFY
|
WS_EX_TOOLWINDOW
:
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
0
,
0
,
WS_EX_NOPARENTNOTIFY
);
rect
.
right
,
rect
.
bottom
,
ShowWindow
(
p_vout
->
p_sys
->
hwnd
,
SW_SHOW
);
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
ShowWindow
(
hwnd
,
SW_HIDE
);
SetForegroundWindow
(
p_vout
->
p_sys
->
hparent
);
}
}
/* Change window style, borders and title bar */
/* Make sure the mouse cursor is displayed */
SetWindowLong
(
p_vout
->
p_sys
->
hwnd
,
GWL_STYLE
,
i_style
);
PostMessage
(
p_vout
->
p_sys
->
hwnd
,
WM_VLC_SHOW_MOUSE
,
0
,
0
);
SetWindowPlacement
(
p_vout
->
p_sys
->
hwnd
,
&
window_placement
);
}
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
0
,
0
,
0
,
0
,
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
/* Update the object variable and trigger callback */
/* Update the object variable and trigger callback */
val
.
b_bool
=
p_vout
->
b_fullscreen
;
val
.
b_bool
=
p_vout
->
b_fullscreen
;
...
...
modules/video_output/directx/events.c
View file @
d0bc42f4
...
@@ -121,8 +121,7 @@ void DirectXEventThread( event_thread_t *p_event )
...
@@ -121,8 +121,7 @@ void DirectXEventThread( event_thread_t *p_event )
/* Main loop */
/* Main loop */
/* GetMessage will sleep if there's no message in the queue */
/* GetMessage will sleep if there's no message in the queue */
while
(
!
p_event
->
b_die
&&
while
(
!
p_event
->
b_die
&&
GetMessage
(
&
msg
,
0
,
0
,
0
)
)
GetMessage
(
&
msg
,
p_event
->
p_vout
->
p_sys
->
hwnd
,
0
,
0
)
)
{
{
/* Check if we are asked to exit */
/* Check if we are asked to exit */
if
(
p_event
->
b_die
)
if
(
p_event
->
b_die
)
...
@@ -137,7 +136,7 @@ void DirectXEventThread( event_thread_t *p_event )
...
@@ -137,7 +136,7 @@ void DirectXEventThread( event_thread_t *p_event )
p_event
->
p_vout
->
p_sys
->
i_window_height
,
p_event
->
p_vout
->
p_sys
->
i_window_height
,
&
i_x
,
&
i_y
,
&
i_width
,
&
i_height
);
&
i_x
,
&
i_y
,
&
i_width
,
&
i_height
);
if
(
msg
.
hwnd
!=
p_event
->
p_vout
->
p_sys
->
h
wnd
)
if
(
msg
.
hwnd
==
p_event
->
p_vout
->
p_sys
->
hvideo
wnd
)
{
{
/* Child window */
/* Child window */
i_x
=
i_y
=
0
;
i_x
=
i_y
=
0
;
...
@@ -361,7 +360,7 @@ static int DirectXCreateWindow( vout_thread_t *p_vout )
...
@@ -361,7 +360,7 @@ static int DirectXCreateWindow( vout_thread_t *p_vout )
WNDCLASSEX
wc
;
/* window class components */
WNDCLASSEX
wc
;
/* window class components */
HICON
vlc_icon
=
NULL
;
HICON
vlc_icon
=
NULL
;
char
vlc_path
[
MAX_PATH
+
1
];
char
vlc_path
[
MAX_PATH
+
1
];
int
i_style
,
i_stylex
;
int
i_style
;
msg_Dbg
(
p_vout
,
"DirectXCreateWindow"
);
msg_Dbg
(
p_vout
,
"DirectXCreateWindow"
);
...
@@ -441,17 +440,15 @@ static int DirectXCreateWindow( vout_thread_t *p_vout )
...
@@ -441,17 +440,15 @@ static int DirectXCreateWindow( vout_thread_t *p_vout )
AdjustWindowRect
(
&
rect_window
,
WS_OVERLAPPEDWINDOW
|
WS_SIZEBOX
,
0
);
AdjustWindowRect
(
&
rect_window
,
WS_OVERLAPPEDWINDOW
|
WS_SIZEBOX
,
0
);
i_style
=
WS_OVERLAPPEDWINDOW
|
WS_SIZEBOX
|
WS_VISIBLE
|
WS_CLIPCHILDREN
;
i_style
=
WS_OVERLAPPEDWINDOW
|
WS_SIZEBOX
|
WS_VISIBLE
|
WS_CLIPCHILDREN
;
i_stylex
=
0
;
if
(
p_vout
->
p_sys
->
hparent
)
if
(
p_vout
->
p_sys
->
hparent
)
{
{
i_style
=
WS_VISIBLE
|
WS_CLIPCHILDREN
|
WS_CHILD
;
i_style
=
WS_VISIBLE
|
WS_CLIPCHILDREN
|
WS_CHILD
;
i_stylex
=
WS_EX_TOOLWINDOW
;
}
}
/* Create the window */
/* Create the window */
p_vout
->
p_sys
->
hwnd
=
p_vout
->
p_sys
->
hwnd
=
CreateWindowEx
(
WS_EX_NOPARENTNOTIFY
|
i_stylex
,
CreateWindowEx
(
WS_EX_NOPARENTNOTIFY
,
"VLC DirectX"
,
/* name of window class */
"VLC DirectX"
,
/* name of window class */
VOUT_TITLE
" (DirectX Output)"
,
/* window title bar text */
VOUT_TITLE
" (DirectX Output)"
,
/* window title bar text */
i_style
,
/* window style */
i_style
,
/* window style */
...
@@ -483,6 +480,15 @@ static int DirectXCreateWindow( vout_thread_t *p_vout )
...
@@ -483,6 +480,15 @@ static int DirectXCreateWindow( vout_thread_t *p_vout )
/* Hmmm, apparently this is a blocking call... */
/* Hmmm, apparently this is a blocking call... */
SetWindowLong
(
p_vout
->
p_sys
->
hparent
,
GWL_STYLE
,
SetWindowLong
(
p_vout
->
p_sys
->
hparent
,
GWL_STYLE
,
i_style
|
WS_CLIPCHILDREN
);
i_style
|
WS_CLIPCHILDREN
);
/* Create our fullscreen window */
p_vout
->
p_sys
->
hfswnd
=
CreateWindowEx
(
WS_EX_APPWINDOW
,
"VLC DirectX"
,
VOUT_TITLE
" (DirectX Output)"
,
WS_OVERLAPPEDWINDOW
|
WS_CLIPCHILDREN
|
WS_SIZEBOX
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
NULL
,
NULL
,
hInstance
,
NULL
);
}
}
/* Now display the window */
/* Now display the window */
...
@@ -512,6 +518,7 @@ static void DirectXCloseWindow( vout_thread_t *p_vout )
...
@@ -512,6 +518,7 @@ static void DirectXCloseWindow( vout_thread_t *p_vout )
msg_Dbg
(
p_vout
,
"DirectXCloseWindow"
);
msg_Dbg
(
p_vout
,
"DirectXCloseWindow"
);
DestroyWindow
(
p_vout
->
p_sys
->
hwnd
);
DestroyWindow
(
p_vout
->
p_sys
->
hwnd
);
if
(
p_vout
->
p_sys
->
hfswnd
)
DestroyWindow
(
p_vout
->
p_sys
->
hfswnd
);
if
(
p_vout
->
p_sys
->
hparent
)
if
(
p_vout
->
p_sys
->
hparent
)
vout_ReleaseWindow
(
p_vout
,
(
void
*
)
p_vout
->
p_sys
->
hparent
);
vout_ReleaseWindow
(
p_vout
,
(
void
*
)
p_vout
->
p_sys
->
hparent
);
...
...
modules/video_output/directx/glwin32.c
View file @
d0bc42f4
...
@@ -103,7 +103,7 @@ static int OpenVideo( vlc_object_t *p_this )
...
@@ -103,7 +103,7 @@ static int OpenVideo( vlc_object_t *p_this )
p_vout
->
p_sys
->
p_current_surface
=
NULL
;
p_vout
->
p_sys
->
p_current_surface
=
NULL
;
p_vout
->
p_sys
->
p_clipper
=
NULL
;
p_vout
->
p_sys
->
p_clipper
=
NULL
;
p_vout
->
p_sys
->
hwnd
=
p_vout
->
p_sys
->
hvideownd
=
NULL
;
p_vout
->
p_sys
->
hwnd
=
p_vout
->
p_sys
->
hvideownd
=
NULL
;
p_vout
->
p_sys
->
hparent
=
NULL
;
p_vout
->
p_sys
->
hparent
=
p_vout
->
p_sys
->
hfswnd
=
NULL
;
p_vout
->
p_sys
->
i_changes
=
0
;
p_vout
->
p_sys
->
i_changes
=
0
;
p_vout
->
p_sys
->
b_wallpaper
=
0
;
p_vout
->
p_sys
->
b_wallpaper
=
0
;
vlc_mutex_init
(
p_vout
,
&
p_vout
->
p_sys
->
lock
);
vlc_mutex_init
(
p_vout
,
&
p_vout
->
p_sys
->
lock
);
...
@@ -307,64 +307,83 @@ static int Manage( vout_thread_t *p_vout )
...
@@ -307,64 +307,83 @@ static int Manage( vout_thread_t *p_vout )
if
(
p_vout
->
i_changes
&
VOUT_FULLSCREEN_CHANGE
if
(
p_vout
->
i_changes
&
VOUT_FULLSCREEN_CHANGE
||
p_vout
->
p_sys
->
i_changes
&
VOUT_FULLSCREEN_CHANGE
)
||
p_vout
->
p_sys
->
i_changes
&
VOUT_FULLSCREEN_CHANGE
)
{
{
int
i_style
=
0
;
vlc_value_t
val
;
vlc_value_t
val
;
HWND
hwnd
=
(
p_vout
->
p_sys
->
hparent
&&
p_vout
->
p_sys
->
hfswnd
)
?
p_vout
->
p_sys
->
hfswnd
:
p_vout
->
p_sys
->
hwnd
;
p_vout
->
b_fullscreen
=
!
p_vout
->
b_fullscreen
;
p_vout
->
b_fullscreen
=
!
p_vout
->
b_fullscreen
;
/* We need to switch between Maximized and Normal sized window */
/* We need to switch between Maximized and Normal sized window */
window_placement
.
length
=
sizeof
(
WINDOWPLACEMENT
);
window_placement
.
length
=
sizeof
(
WINDOWPLACEMENT
);
GetWindowPlacement
(
hwnd
,
&
window_placement
);
if
(
p_vout
->
b_fullscreen
)
if
(
p_vout
->
b_fullscreen
)
{
{
/* Change window style, no borders and no title bar */
int
i_style
=
WS_CLIPCHILDREN
|
WS_VISIBLE
;
SetWindowLong
(
hwnd
,
GWL_STYLE
,
i_style
);
if
(
p_vout
->
p_sys
->
hparent
)
if
(
p_vout
->
p_sys
->
hparent
)
{
{
POINT
point
;
/* Retrieve current window position so fullscreen will happen
* on the right screen */
/* Retrieve the window position */
POINT
point
=
{
0
,
0
};
point
.
x
=
point
.
y
=
0
;
RECT
rect
;
ClientToScreen
(
p_vout
->
p_sys
->
hwnd
,
&
point
);
ClientToScreen
(
p_vout
->
p_sys
->
hwnd
,
&
point
);
SetParent
(
p_vout
->
p_sys
->
hwnd
,
GetDesktopWindow
()
);
GetClientRect
(
p_vout
->
p_sys
->
hwnd
,
&
rect
);
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
point
.
x
,
point
.
y
,
0
,
0
,
SetWindowPos
(
hwnd
,
0
,
point
.
x
,
point
.
y
,
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
rect
.
right
,
rect
.
bottom
,
SetForegroundWindow
(
p_vout
->
p_sys
->
hwnd
);
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
GetWindowPlacement
(
hwnd
,
&
window_placement
);
}
}
/* Maximized window */
/* Maximize window */
GetWindowPlacement
(
p_vout
->
p_sys
->
hwnd
,
&
window_placement
);
window_placement
.
showCmd
=
SW_SHOWMAXIMIZED
;
window_placement
.
showCmd
=
SW_SHOWMAXIMIZED
;
/* Change window style, no borders and no title bar */
SetWindowPlacement
(
hwnd
,
&
window_placement
);
i_style
=
WS_CLIPCHILDREN
|
WS_VISIBLE
|
WS_POPUP
;
SetWindowPos
(
hwnd
,
0
,
0
,
0
,
0
,
0
,
}
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
else
{
if
(
p_vout
->
p_sys
->
hparent
)
if
(
p_vout
->
p_sys
->
hparent
)
{
{
SetParent
(
p_vout
->
p_sys
->
hwnd
,
p_vout
->
p_sys
->
hparent
);
RECT
rect
;
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
0
,
0
,
0
,
0
,
GetClientRect
(
hwnd
,
&
rect
);
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
SetParent
(
p_vout
->
p_sys
->
hwnd
,
hwnd
);
i_style
=
WS_CLIPCHILDREN
|
WS_VISIBLE
|
WS_CHILD
;
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
0
,
0
,
SetForegroundWindow
(
p_vout
->
p_sys
->
hparent
);
rect
.
right
,
rect
.
bottom
,
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
}
SetForegroundWindow
(
hwnd
);
}
}
else
else
{
{
i_style
=
WS_CLIPCHILDREN
|
WS_OVERLAPPEDWINDOW
|
/* Change window style, no borders and no title bar */
int
i_style
=
WS_CLIPCHILDREN
|
WS_OVERLAPPEDWINDOW
|
WS_SIZEBOX
|
WS_VISIBLE
;
WS_SIZEBOX
|
WS_VISIBLE
;
}
SetWindowLong
(
hwnd
,
GWL_STYLE
,
i_style
);
/* Normal window */
/* Normal window */
GetWindowPlacement
(
p_vout
->
p_sys
->
hwnd
,
&
window_placement
);
window_placement
.
showCmd
=
SW_SHOWNORMAL
;
window_placement
.
showCmd
=
SW_SHOWNORMAL
;
SetWindowPlacement
(
hwnd
,
&
window_placement
);
SetWindowPos
(
hwnd
,
0
,
0
,
0
,
0
,
0
,
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
if
(
p_vout
->
p_sys
->
hparent
)
{
RECT
rect
;
GetClientRect
(
p_vout
->
p_sys
->
hparent
,
&
rect
);
SetParent
(
p_vout
->
p_sys
->
hwnd
,
p_vout
->
p_sys
->
hparent
);
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
0
,
0
,
rect
.
right
,
rect
.
bottom
,
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
ShowWindow
(
hwnd
,
SW_HIDE
);
SetForegroundWindow
(
p_vout
->
p_sys
->
hparent
);
}
/* Make sure the mouse cursor is displayed */
/* Make sure the mouse cursor is displayed */
PostMessage
(
p_vout
->
p_sys
->
hwnd
,
WM_VLC_SHOW_MOUSE
,
0
,
0
);
PostMessage
(
p_vout
->
p_sys
->
hwnd
,
WM_VLC_SHOW_MOUSE
,
0
,
0
);
}
}
/* Change window style, borders and title bar */
SetWindowLong
(
p_vout
->
p_sys
->
hwnd
,
GWL_STYLE
,
i_style
);
SetWindowPlacement
(
p_vout
->
p_sys
->
hwnd
,
&
window_placement
);
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
0
,
0
,
0
,
0
,
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
/* Update the object variable and trigger callback */
/* Update the object variable and trigger callback */
val
.
b_bool
=
p_vout
->
b_fullscreen
;
val
.
b_bool
=
p_vout
->
b_fullscreen
;
var_Set
(
p_vout
,
"fullscreen"
,
val
);
var_Set
(
p_vout
,
"fullscreen"
,
val
);
...
...
modules/video_output/directx/vout.h
View file @
d0bc42f4
...
@@ -49,6 +49,7 @@ struct vout_sys_t
...
@@ -49,6 +49,7 @@ struct vout_sys_t
HWND
hwnd
;
/* Handle of the main window */
HWND
hwnd
;
/* Handle of the main window */
HWND
hvideownd
;
/* Handle of the video sub-window */
HWND
hvideownd
;
/* Handle of the video sub-window */
HWND
hparent
;
/* Handle of the parent window */
HWND
hparent
;
/* Handle of the parent window */
HWND
hfswnd
;
/* Handle of the fullscreen window */
WNDPROC
pf_wndproc
;
/* Window handling callback */
WNDPROC
pf_wndproc
;
/* Window handling callback */
/* Multi-monitor support */
/* Multi-monitor support */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment