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
f3ae1b99
Commit
f3ae1b99
authored
Jun 09, 2011
by
Ričardas Barkauskas
Committed by
Alexandre Julliard
Jun 10, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Separate IDirectDrawSurface vtable.
parent
27063ffe
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
13 deletions
+19
-13
ddraw.c
dlls/ddraw/ddraw.c
+12
-12
ddraw_private.h
dlls/ddraw/ddraw_private.h
+6
-0
device.c
dlls/ddraw/device.c
+1
-1
surface.c
dlls/ddraw/surface.c
+0
-0
No files found.
dlls/ddraw/ddraw.c
View file @
f3ae1b99
...
...
@@ -2071,7 +2071,7 @@ static HRESULT WINAPI ddraw3_GetGDISurface(IDirectDraw3 *iface, IDirectDrawSurfa
return
hr
;
}
surface_impl
=
impl_from_IDirectDrawSurface7
(
surface7
);
*
surface
=
(
IDirectDrawSurface
*
)
&
surface_impl
->
IDirectDrawSurface3
_iface
;
*
surface
=
&
surface_impl
->
IDirectDrawSurface
_iface
;
return
hr
;
}
...
...
@@ -2092,7 +2092,7 @@ static HRESULT WINAPI ddraw2_GetGDISurface(IDirectDraw2 *iface, IDirectDrawSurfa
return
hr
;
}
surface_impl
=
impl_from_IDirectDrawSurface7
(
surface7
);
*
surface
=
(
IDirectDrawSurface
*
)
&
surface_impl
->
IDirectDrawSurface3
_iface
;
*
surface
=
&
surface_impl
->
IDirectDrawSurface
_iface
;
return
hr
;
}
...
...
@@ -2113,7 +2113,7 @@ static HRESULT WINAPI ddraw1_GetGDISurface(IDirectDraw *iface, IDirectDrawSurfac
return
hr
;
}
surface_impl
=
impl_from_IDirectDrawSurface7
(
surface7
);
*
surface
=
(
IDirectDrawSurface
*
)
&
surface_impl
->
IDirectDrawSurface3
_iface
;
*
surface
=
&
surface_impl
->
IDirectDrawSurface
_iface
;
return
hr
;
}
...
...
@@ -2486,7 +2486,7 @@ static HRESULT WINAPI ddraw4_GetSurfaceFromDC(IDirectDraw4 *iface, HDC dc,
}
surface_impl
=
impl_from_IDirectDrawSurface7
(
surface7
);
/* Tests say this is true */
*
surface
=
(
IDirectDrawSurface4
*
)
&
surface_impl
->
IDirectDrawSurface
3
_iface
;
*
surface
=
(
IDirectDrawSurface4
*
)
&
surface_impl
->
IDirectDrawSurface_iface
;
return
hr
;
}
...
...
@@ -2511,7 +2511,7 @@ static HRESULT WINAPI ddraw3_GetSurfaceFromDC(IDirectDraw3 *iface, HDC dc,
}
surface_impl
=
impl_from_IDirectDrawSurface7
(
surface7
);
*
surface
=
(
IDirectDrawSurface
*
)
&
surface_impl
->
IDirectDrawSurface3
_iface
;
*
surface
=
&
surface_impl
->
IDirectDrawSurface
_iface
;
return
hr
;
}
...
...
@@ -3605,7 +3605,7 @@ static HRESULT WINAPI ddraw3_CreateSurface(IDirectDraw3 *iface, DDSURFACEDESC *s
return
hr
;
}
*
surface
=
(
IDirectDrawSurface
*
)
&
impl
->
IDirectDrawSurface3
_iface
;
*
surface
=
&
impl
->
IDirectDrawSurface
_iface
;
ddraw_set_surface_version
(
impl
,
3
);
IDirectDraw7_Release
(
&
This
->
IDirectDraw7_iface
);
IDirectDraw3_AddRef
(
iface
);
...
...
@@ -3649,7 +3649,7 @@ static HRESULT WINAPI ddraw2_CreateSurface(IDirectDraw2 *iface,
return
hr
;
}
*
surface
=
(
IDirectDrawSurface
*
)
&
impl
->
IDirectDrawSurface3
_iface
;
*
surface
=
&
impl
->
IDirectDrawSurface
_iface
;
ddraw_set_surface_version
(
impl
,
2
);
IDirectDraw7_Release
(
&
This
->
IDirectDraw7_iface
);
impl
->
ifaceToRelease
=
NULL
;
...
...
@@ -3683,7 +3683,7 @@ static HRESULT WINAPI ddraw1_CreateSurface(IDirectDraw *iface,
return
hr
;
}
*
surface
=
(
IDirectDrawSurface
*
)
&
impl
->
IDirectDrawSurface3
_iface
;
*
surface
=
&
impl
->
IDirectDrawSurface
_iface
;
ddraw_set_surface_version
(
impl
,
1
);
IDirectDraw7_Release
(
&
This
->
IDirectDraw7_iface
);
impl
->
ifaceToRelease
=
NULL
;
...
...
@@ -3815,7 +3815,7 @@ static HRESULT CALLBACK EnumSurfacesCallbackThunk(IDirectDrawSurface7 *surface,
IDirectDrawSurfaceImpl
*
surface_impl
=
impl_from_IDirectDrawSurface7
(
surface
);
struct
surfacescallback_context
*
cbcontext
=
context
;
return
cbcontext
->
func
(
(
IDirectDrawSurface
*
)
&
surface_impl
->
IDirectDrawSurface3
_iface
,
return
cbcontext
->
func
(
&
surface_impl
->
IDirectDrawSurface
_iface
,
(
DDSURFACEDESC
*
)
surface_desc
,
cbcontext
->
context
);
}
...
...
@@ -4277,7 +4277,7 @@ static HRESULT WINAPI ddraw3_DuplicateSurface(IDirectDraw3 *iface, IDirectDrawSu
if
(
FAILED
(
hr
))
return
hr
;
dst_impl
=
impl_from_IDirectDrawSurface7
(
dst7
);
*
dst
=
(
IDirectDrawSurface
*
)
&
dst_impl
->
IDirectDrawSurface3
_iface
;
*
dst
=
&
dst_impl
->
IDirectDrawSurface
_iface
;
return
hr
;
}
...
...
@@ -4297,7 +4297,7 @@ static HRESULT WINAPI ddraw2_DuplicateSurface(IDirectDraw2 *iface,
if
(
FAILED
(
hr
))
return
hr
;
dst_impl
=
impl_from_IDirectDrawSurface7
(
dst7
);
*
dst
=
(
IDirectDrawSurface
*
)
&
dst_impl
->
IDirectDrawSurface3
_iface
;
*
dst
=
&
dst_impl
->
IDirectDrawSurface
_iface
;
return
hr
;
}
...
...
@@ -4317,7 +4317,7 @@ static HRESULT WINAPI ddraw1_DuplicateSurface(IDirectDraw *iface, IDirectDrawSur
if
(
FAILED
(
hr
))
return
hr
;
dst_impl
=
impl_from_IDirectDrawSurface7
(
dst7
);
*
dst
=
(
IDirectDrawSurface
*
)
&
dst_impl
->
IDirectDrawSurface3
_iface
;
*
dst
=
&
dst_impl
->
IDirectDrawSurface
_iface
;
return
hr
;
}
...
...
dlls/ddraw/ddraw_private.h
View file @
f3ae1b99
...
...
@@ -156,6 +156,7 @@ struct IDirectDrawSurfaceImpl
IDirectDrawSurface4
IDirectDrawSurface4_iface
;
IDirectDrawSurface3
IDirectDrawSurface3_iface
;
IDirectDrawSurface2
IDirectDrawSurface2_iface
;
IDirectDrawSurface
IDirectDrawSurface_iface
;
IDirectDrawGammaControl
IDirectDrawGammaControl_iface
;
const
IDirect3DTexture2Vtbl
*
IDirect3DTexture2_vtbl
;
const
IDirect3DTextureVtbl
*
IDirect3DTexture_vtbl
;
...
...
@@ -222,6 +223,11 @@ static inline IDirectDrawSurfaceImpl *surface_from_texture2(IDirect3DTexture2 *i
return
(
IDirectDrawSurfaceImpl
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
IDirectDrawSurfaceImpl
,
IDirect3DTexture2_vtbl
));
}
static
inline
IDirectDrawSurfaceImpl
*
impl_from_IDirectDrawSurface
(
IDirectDrawSurface
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirectDrawSurfaceImpl
,
IDirectDrawSurface_iface
);
}
static
inline
IDirectDrawSurfaceImpl
*
impl_from_IDirectDrawSurface2
(
IDirectDrawSurface2
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirectDrawSurfaceImpl
,
IDirectDrawSurface2_iface
);
...
...
dlls/ddraw/device.c
View file @
f3ae1b99
...
...
@@ -1981,7 +1981,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_GetRenderTarget(IDirect3DDevice2 *if
hr
=
IDirect3DDevice7_GetRenderTarget
((
IDirect3DDevice7
*
)
This
,
&
RenderTarget7
);
if
(
hr
!=
D3D_OK
)
return
hr
;
RenderTargetImpl
=
impl_from_IDirectDrawSurface7
(
RenderTarget7
);
*
RenderTarget
=
(
IDirectDrawSurface
*
)
&
RenderTargetImpl
->
IDirectDrawSurface3
_iface
;
*
RenderTarget
=
&
RenderTargetImpl
->
IDirectDrawSurface
_iface
;
return
D3D_OK
;
}
...
...
dlls/ddraw/surface.c
View file @
f3ae1b99
This diff is collapsed.
Click to expand it.
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