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
ba850c47
Commit
ba850c47
authored
Nov 26, 2002
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/video_output/directx/directx.c: fixed to work with DirectDraw 3 (ie. with NT4).
parent
e2ca77a9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
13 deletions
+24
-13
modules/video_output/directx/directx.c
modules/video_output/directx/directx.c
+24
-13
No files found.
modules/video_output/directx/directx.c
View file @
ba850c47
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* vout.c: Windows DirectX video output display method
* vout.c: Windows DirectX video output display method
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* Copyright (C) 2001 VideoLAN
* $Id: directx.c,v 1.
7 2002/11/26 10:55:19
gbazin Exp $
* $Id: directx.c,v 1.
8 2002/11/26 19:31:50
gbazin Exp $
*
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
*
...
@@ -1409,21 +1409,32 @@ static int DirectXGetSurfaceDesc( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -1409,21 +1409,32 @@ static int DirectXGetSurfaceDesc( vout_thread_t *p_vout, picture_t *p_pic )
NULL
,
&
p_pic
->
p_sys
->
ddsd
,
NULL
,
&
p_pic
->
p_sys
->
ddsd
,
DDLOCK_NOSYSLOCK
|
DDLOCK_WAIT
,
DDLOCK_NOSYSLOCK
|
DDLOCK_WAIT
,
NULL
);
NULL
);
if
(
dxresult
==
DDERR_SURFACELOST
)
if
(
dxresult
!=
DD_OK
)
{
if
(
dxresult
==
DDERR_INVALIDPARAMS
)
{
/* DirectX 3 doesn't support the DDLOCK_NOSYSLOCK flag, resulting
* in an invalid params error */
dxresult
=
IDirectDrawSurface2_Restore
(
p_pic
->
p_sys
->
p_surface
);
dxresult
=
IDirectDrawSurface2_Lock
(
p_pic
->
p_sys
->
p_surface
,
NULL
,
&
p_pic
->
p_sys
->
ddsd
,
DDLOCK_WAIT
,
NULL
);
}
if
(
dxresult
==
DDERR_SURFACELOST
)
{
{
/* Your surface can be lost so be sure
/* Your surface can be lost so be sure
* to check this and restore it if needed */
* to check this and restore it if needed */
dxresult
=
IDirectDrawSurface2_Restore
(
p_pic
->
p_sys
->
p_surface
);
dxresult
=
IDirectDrawSurface2_Restore
(
p_pic
->
p_sys
->
p_surface
);
dxresult
=
IDirectDrawSurface2_Lock
(
p_pic
->
p_sys
->
p_surface
,
NULL
,
dxresult
=
IDirectDrawSurface2_Lock
(
p_pic
->
p_sys
->
p_surface
,
NULL
,
&
p_pic
->
p_sys
->
ddsd
,
&
p_pic
->
p_sys
->
ddsd
,
DDLOCK_NOSYSLOCK
|
DDLOCK_WAIT
,
DDLOCK_WAIT
,
NULL
);
NULL
);
}
}
if
(
dxresult
!=
DD_OK
)
if
(
dxresult
!=
DD_OK
)
{
{
msg_Err
(
p_vout
,
"DirectXGetSurfaceDesc cannot lock surface"
);
msg_Err
(
p_vout
,
"DirectXGetSurfaceDesc cannot lock surface"
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
}
/* Unlock the Surface */
/* Unlock the Surface */
dxresult
=
IDirectDrawSurface2_Unlock
(
p_pic
->
p_sys
->
p_surface
,
NULL
);
dxresult
=
IDirectDrawSurface2_Unlock
(
p_pic
->
p_sys
->
p_surface
,
NULL
);
...
...
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