Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Steve Lhomme
vlc
Commits
fd392748
Commit
fd392748
authored
Nov 18, 2017
by
Steve Lhomme
Committed by
Jean-Baptiste Kempf
Nov 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9_fmt: make IDirect3D9_GetAdapterDisplayMode simpler
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
78b06331
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
modules/video_chroma/d3d9_fmt.c
modules/video_chroma/d3d9_fmt.c
+7
-5
modules/video_chroma/d3d9_fmt.h
modules/video_chroma/d3d9_fmt.h
+1
-2
modules/video_output/win32/direct3d9.c
modules/video_output/win32/direct3d9.c
+4
-1
No files found.
modules/video_chroma/d3d9_fmt.c
View file @
fd392748
...
...
@@ -85,8 +85,12 @@ HRESULT D3D9_CreateDevice(vlc_object_t *o, d3d9_handle_t *hd3d, HWND hwnd,
}
out
->
adapterId
=
AdapterToUse
;
if
(
D3D9_FillPresentationParameters
(
o
,
hd3d
,
source
,
out
))
out
->
hwnd
=
hwnd
;
if
(
D3D9_FillPresentationParameters
(
hd3d
,
source
,
out
))
{
msg_Err
(
o
,
"Could not presentation parameters"
);
return
E_INVALIDARG
;
}
/* */
D3DADAPTER_IDENTIFIER9
d3dai
;
...
...
@@ -138,7 +142,7 @@ void D3D9_ReleaseDevice(d3d9_device_t *d3d_dev)
* It setup vout_display_sys_t::d3dpp and vout_display_sys_t::rect_display
* from the default adapter.
*/
int
D3D9_FillPresentationParameters
(
vlc_object_t
*
o
,
d3d9_handle_t
*
hd3d
,
int
D3D9_FillPresentationParameters
(
d3d9_handle_t
*
hd3d
,
const
video_format_t
*
source
,
d3d9_device_t
*
out
)
{
/*
...
...
@@ -149,10 +153,8 @@ int D3D9_FillPresentationParameters(vlc_object_t *o, d3d9_handle_t *hd3d,
if
(
source
->
i_width
)
{
HRESULT
hr
=
IDirect3D9_GetAdapterDisplayMode
(
hd3d
->
obj
,
out
->
adapterId
,
&
d3ddm
);
if
(
FAILED
(
hr
))
{
msg_Err
(
o
,
"Could not read adapter display mode. (hr=0x%0lx)"
,
hr
);
if
(
FAILED
(
hr
))
return
VLC_EGENERIC
;
}
}
/* Set up the structure used to create the D3DDevice. */
...
...
modules/video_chroma/d3d9_fmt.h
View file @
fd392748
...
...
@@ -84,7 +84,6 @@ int D3D9_Create(vlc_object_t *, d3d9_handle_t *);
void
D3D9_Destroy
(
d3d9_handle_t
*
);
int
D3D9_FillPresentationParameters
(
vlc_object_t
*
,
d3d9_handle_t
*
,
const
video_format_t
*
,
d3d9_device_t
*
out
);
int
D3D9_FillPresentationParameters
(
d3d9_handle_t
*
,
const
video_format_t
*
,
d3d9_device_t
*
);
#endif
/* VLC_VIDEOCHROMA_D3D9_FMT_H_ */
modules/video_output/win32/direct3d9.c
View file @
fd392748
...
...
@@ -817,8 +817,11 @@ static int Direct3D9Reset(vout_display_t *vd)
vout_display_sys_t
*
sys
=
vd
->
sys
;
d3d9_device_t
*
p_d3d9_dev
=
&
sys
->
d3d_dev
;
if
(
D3D9_FillPresentationParameters
(
VLC_OBJECT
(
vd
),
&
sys
->
hd3d
,
&
vd
->
source
,
p_d3d9_dev
))
if
(
D3D9_FillPresentationParameters
(
&
sys
->
hd3d
,
&
vd
->
source
,
p_d3d9_dev
))
{
msg_Err
(
vd
,
"Could not presentation parameters to reset device"
);
return
VLC_EGENERIC
;
}
/* release all D3D objects */
Direct3D9DestroyResources
(
vd
);
...
...
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