Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4c0c0d3a
Commit
4c0c0d3a
authored
Jun 12, 2011
by
Ričardas Barkauskas
Committed by
Alexandre Julliard
Jun 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Fix ddraw4_EnumSurfaces to pass correct iface in callbacks.
parent
7366d159
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
ddraw.c
dlls/ddraw/ddraw.c
+22
-2
No files found.
dlls/ddraw/ddraw.c
View file @
4c0c0d3a
...
...
@@ -3803,12 +3803,28 @@ static BOOL ddraw_match_surface_desc(const DDSURFACEDESC2 *requested, const DDSU
#undef DDENUMSURFACES_SEARCHTYPE
#undef DDENUMSURFACES_MATCHTYPE
struct
surfacescallback2_context
{
LPDDENUMSURFACESCALLBACK2
func
;
void
*
context
;
};
struct
surfacescallback_context
{
LPDDENUMSURFACESCALLBACK
func
;
void
*
context
;
};
static
HRESULT
CALLBACK
EnumSurfacesCallback2Thunk
(
IDirectDrawSurface7
*
surface
,
DDSURFACEDESC2
*
surface_desc
,
void
*
context
)
{
IDirectDrawSurfaceImpl
*
surface_impl
=
impl_from_IDirectDrawSurface7
(
surface
);
struct
surfacescallback2_context
*
cbcontext
=
context
;
return
cbcontext
->
func
(
&
surface_impl
->
IDirectDrawSurface4_iface
,
surface_desc
,
cbcontext
->
context
);
}
static
HRESULT
CALLBACK
EnumSurfacesCallbackThunk
(
IDirectDrawSurface7
*
surface
,
DDSURFACEDESC2
*
surface_desc
,
void
*
context
)
{
...
...
@@ -3890,12 +3906,16 @@ static HRESULT WINAPI ddraw4_EnumSurfaces(IDirectDraw4 *iface, DWORD flags,
DDSURFACEDESC2
*
surface_desc
,
void
*
context
,
LPDDENUMSURFACESCALLBACK2
callback
)
{
IDirectDrawImpl
*
This
=
impl_from_IDirectDraw4
(
iface
);
struct
surfacescallback2_context
cbcontext
;
TRACE
(
"iface %p, flags %#x, surface_desc %p, context %p, callback %p.
\n
"
,
iface
,
flags
,
surface_desc
,
context
,
callback
);
return
ddraw7_EnumSurfaces
(
&
This
->
IDirectDraw7_iface
,
flags
,
surface_desc
,
context
,
(
LPDDENUMSURFACESCALLBACK7
)
callback
);
cbcontext
.
func
=
callback
;
cbcontext
.
context
=
context
;
return
ddraw7_EnumSurfaces
(
&
This
->
IDirectDraw7_iface
,
flags
,
(
DDSURFACEDESC2
*
)
surface_desc
,
&
cbcontext
,
EnumSurfacesCallback2Thunk
);
}
static
HRESULT
WINAPI
ddraw3_EnumSurfaces
(
IDirectDraw3
*
iface
,
DWORD
flags
,
...
...
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