Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
1f0d4481
Commit
1f0d4481
authored
May 26, 2016
by
Steve Lhomme
Committed by
Jean-Baptiste Kempf
May 26, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
directdraw: debug the reason a CreateSurface() fails
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
fe6ddde4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
modules/video_output/win32/directdraw.c
modules/video_output/win32/directdraw.c
+13
-4
No files found.
modules/video_output/win32/directdraw.c
View file @
1f0d4481
...
...
@@ -882,13 +882,22 @@ static int DirectXCreateSurface(vout_display_t *vd,
/* Create the video surface */
LPDIRECTDRAWSURFACE
surface_v1
;
if
(
IDirectDraw2_CreateSurface
(
sys
->
ddobject
,
&
ddsd
,
&
surface_v1
,
NULL
)
!=
DD_OK
)
HRESULT
hr
=
IDirectDraw2_CreateSurface
(
sys
->
ddobject
,
&
ddsd
,
&
surface_v1
,
NULL
);
if
(
hr
==
DDERR_INVALIDCAPS
)
{
msg_Dbg
(
vd
,
"failed to create a DirectDrawSurface with invalid caps %lx"
,
ddsd
.
ddsCaps
.
dwCaps
);
return
VLC_EGENERIC
;
}
if
(
hr
!=
DD_OK
)
{
msg_Dbg
(
vd
,
"failed to create a DirectDrawSurface (error %li)"
,
hr
);
return
VLC_EGENERIC
;
}
/* Now that the surface is created, try to get a newer DirectX interface */
HRESULT
hr
=
IDirectDrawSurface_QueryInterface
(
surface_v1
,
&
IID_IDirectDrawSurface2
,
(
LPVOID
*
)
surface
);
hr
=
IDirectDrawSurface_QueryInterface
(
surface_v1
,
&
IID_IDirectDrawSurface2
,
(
LPVOID
*
)
surface
);
IDirectDrawSurface_Release
(
surface_v1
);
if
(
hr
!=
DD_OK
)
{
msg_Err
(
vd
,
"cannot query IDirectDrawSurface2 interface (error %li)"
,
hr
);
...
...
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