Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
09bb05db
Commit
09bb05db
authored
Oct 11, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed overlay in directx regression.
parent
3b471fb3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
4 deletions
+19
-4
modules/video_output/msw/directx.c
modules/video_output/msw/directx.c
+2
-1
modules/video_output/msw/events.c
modules/video_output/msw/events.c
+16
-3
modules/video_output/msw/events.h
modules/video_output/msw/events.h
+1
-0
No files found.
modules/video_output/msw/directx.c
View file @
09bb05db
...
...
@@ -381,7 +381,7 @@ static int Init( vout_thread_t *p_vout )
{
/* If it still didn't work then don't try to use an overlay */
p_vout
->
output
.
i_chroma
=
i_chroma_backup
;
p_vout
->
p_sys
->
b_using_overlay
=
0
;
p_vout
->
p_sys
->
b_using_overlay
=
false
;
msg_Warn
(
p_vout
,
"Could not initialize directx overlay"
)
;
NewPictureVec
(
p_vout
,
p_vout
->
p_picture
);
}
...
...
@@ -397,6 +397,7 @@ static int Init( vout_thread_t *p_vout )
else
psz_fallback
=
VOUT_TITLE
" (software RGB DirectX output)"
;
EventThreadUpdateTitle
(
p_vout
->
p_sys
->
p_event
,
psz_fallback
);
EventThreadUseOverlay
(
p_vout
->
p_sys
->
p_event
,
p_vout
->
p_sys
->
b_using_overlay
);
return
VLC_SUCCESS
;
}
...
...
modules/video_output/msw/events.c
View file @
09bb05db
...
...
@@ -710,13 +710,18 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
if
(
hwnd
==
p_event
->
hvideownd
)
{
#ifdef MODULE_NAME_IS_directx
vlc_mutex_lock
(
&
p_event
->
lock
);
const
bool
use_overlay
=
p_event
->
use_overlay
;
vlc_mutex_unlock
(
&
p_event
->
lock
);
#endif
switch
(
message
)
{
#ifdef MODULE_NAME_IS_directx
case
WM_ERASEBKGND
:
/* For overlay, we need to erase background */
return
!
p_event
->
use_overlay
?
1
:
DefWindowProc
(
hwnd
,
message
,
wParam
,
lParam
);
return
!
use_overlay
?
1
:
DefWindowProc
(
hwnd
,
message
,
wParam
,
lParam
);
case
WM_PAINT
:
/*
** For overlay, DefWindowProc() will erase dirty regions
...
...
@@ -725,7 +730,7 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
** regular interval, therefore dirty regions can be ignored
** to minimize repaint.
*/
if
(
!
p_event
->
use_overlay
)
if
(
!
use_overlay
)
{
ValidateRect
(
hwnd
,
NULL
);
}
...
...
@@ -987,6 +992,14 @@ void EventThreadUpdateWindowPosition( event_thread_t *p_event, bool *pb_changed,
p_event
->
wnd_cfg
.
height
=
h
;
vlc_mutex_unlock
(
&
p_event
->
lock
);
}
void
EventThreadUseOverlay
(
event_thread_t
*
p_event
,
bool
b_used
)
{
vlc_mutex_lock
(
&
p_event
->
lock
);
p_event
->
use_overlay
=
b_used
;
vlc_mutex_unlock
(
&
p_event
->
lock
);
}
event_thread_t
*
EventThreadCreate
(
vout_thread_t
*
p_vout
,
const
vout_window_cfg_t
*
p_wnd_cfg
)
{
/* Create the Vout EventThread, this thread is created by us to isolate
...
...
modules/video_output/msw/events.h
View file @
09bb05db
...
...
@@ -54,3 +54,4 @@ unsigned EventThreadRetreiveChanges( event_thread_t * );
int
EventThreadGetWindowStyle
(
event_thread_t
*
);
void
EventThreadUpdateWindowPosition
(
event_thread_t
*
,
bool
*
pb_changed
,
int
x
,
int
y
,
int
w
,
int
h
);
void
EventThreadUseOverlay
(
event_thread_t
*
,
bool
b_used
);
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