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
b3f43c1d
Commit
b3f43c1d
authored
Sep 09, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify DX_DESKTOP_CHANGE case.
parent
cadfc541
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
25 deletions
+8
-25
modules/video_output/msw/direct3d.c
modules/video_output/msw/direct3d.c
+4
-19
modules/video_output/msw/events.c
modules/video_output/msw/events.c
+4
-4
modules/video_output/msw/vout.h
modules/video_output/msw/vout.h
+0
-2
No files found.
modules/video_output/msw/direct3d.c
View file @
b3f43c1d
...
...
@@ -359,22 +359,14 @@ static int Manage( vout_thread_t *p_vout )
}
/*
* Desktop mode change
*/
* Desktop mode change
*/
if
(
p_vout
->
p_sys
->
i_changes
&
DX_DESKTOP_CHANGE
)
{
/* Close the direct3d instance attached to the current output window. */
End
(
p_vout
);
StopEventThread
(
p_vout
);
/* Set the switching mode flag */
p_vout
->
p_sys
->
i_changes
|=
SWITCHING_MODE_FLAG
;
/* Reset the flag */
p_vout
->
p_sys
->
i_changes
&=
~
DX_DESKTOP_CHANGE
;
}
if
(
p_vout
->
p_sys
->
i_changes
&
EVENT_THREAD_ENDED
&&
p_vout
->
p_sys
->
i_changes
&
SWITCHING_MODE_FLAG
)
{
/* Open the direct3d output and attaches it to the new window */
p_vout
->
p_sys
->
b_desktop
=
!
p_vout
->
p_sys
->
b_desktop
;
p_vout
->
pf_display
=
FirstDisplay
;
...
...
@@ -383,9 +375,8 @@ static int Manage( vout_thread_t *p_vout )
CreateEventThread
(
p_vout
);
Init
(
p_vout
);
/* Reset the flags */
p_vout
->
p_sys
->
i_changes
&=
~
EVENT_THREAD_ENDED
;
p_vout
->
p_sys
->
i_changes
&=
~
SWITCHING_MODE_FLAG
;
/* Reset the flag */
p_vout
->
p_sys
->
i_changes
&=
~
DX_DESKTOP_CHANGE
;
}
/* autoscale toggle */
...
...
@@ -514,9 +505,6 @@ static void Display( vout_thread_t *p_vout, picture_t *p_pic )
LPDIRECT3DDEVICE9
p_d3ddev
=
p_vout
->
p_sys
->
p_d3ddev
;
if
(
p_vout
->
p_sys
->
i_changes
&
SWITCHING_MODE_FLAG
)
return
;
// Present the back buffer contents to the display
// stretching and filtering happens here
HRESULT
hr
=
IDirect3DDevice9_Present
(
p_d3ddev
,
...
...
@@ -1290,9 +1278,6 @@ static void Direct3DVoutRenderScene( vout_thread_t *p_vout, picture_t *p_pic )
HRESULT
hr
;
float
f_width
,
f_height
;
if
(
p_vout
->
p_sys
->
i_changes
&
SWITCHING_MODE_FLAG
)
return
;
// check if device is still available
hr
=
IDirect3DDevice9_TestCooperativeLevel
(
p_d3ddev
);
if
(
FAILED
(
hr
)
)
...
...
modules/video_output/msw/events.c
View file @
b3f43c1d
...
...
@@ -396,10 +396,7 @@ static void *EventThread( void *p_this )
msg_Dbg
(
p_vout
,
"DirectXEventThread terminating"
);
DirectXCloseWindow
(
p_event
->
p_vout
);
vlc_restorecancel
(
canc
);
/* clear the changes formerly signaled */
p_event
->
p_vout
->
p_sys
->
i_changes
=
EVENT_THREAD_ENDED
;
vlc_restorecancel
(
canc
);
return
NULL
;
}
...
...
@@ -971,6 +968,9 @@ static void EventThreadStop( event_thread_t *p_event )
vlc_join
(
p_event
->
thread
,
NULL
);
p_event
->
b_ready
=
false
;
/* clear the changes formerly signaled */
p_event
->
p_vout
->
p_sys
->
i_changes
=
0
;
}
/* */
...
...
modules/video_output/msw/vout.h
View file @
b3f43c1d
...
...
@@ -289,8 +289,6 @@ void RestoreScreensaver ( vout_thread_t *p_vout );
#define DX_POSITION_CHANGE 0x1000
#define DX_WALLPAPER_CHANGE 0x2000
#define DX_DESKTOP_CHANGE 0x4000
#define EVENT_THREAD_ENDED 0x6000
#define SWITCHING_MODE_FLAG 0x8000
/*****************************************************************************
* WinCE helpers
...
...
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