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
4582562f
Commit
4582562f
authored
Jun 06, 2011
by
Ričardas Barkauskas
Committed by
Alexandre Julliard
Jun 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Use unsafe_impl_from_IDirectDrawSurface4.
parent
2f02bbb4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
3 deletions
+11
-3
ddraw.c
dlls/ddraw/ddraw.c
+2
-2
ddraw_private.h
dlls/ddraw/ddraw_private.h
+1
-0
device.c
dlls/ddraw/device.c
+1
-1
surface.c
dlls/ddraw/surface.c
+7
-0
No files found.
dlls/ddraw/ddraw.c
View file @
4582562f
...
@@ -4243,7 +4243,7 @@ static HRESULT WINAPI ddraw4_DuplicateSurface(IDirectDraw4 *iface, IDirectDrawSu
...
@@ -4243,7 +4243,7 @@ static HRESULT WINAPI ddraw4_DuplicateSurface(IDirectDraw4 *iface, IDirectDrawSu
IDirectDrawSurface4
**
dst
)
IDirectDrawSurface4
**
dst
)
{
{
IDirectDrawImpl
*
This
=
impl_from_IDirectDraw4
(
iface
);
IDirectDrawImpl
*
This
=
impl_from_IDirectDraw4
(
iface
);
IDirectDrawSurfaceImpl
*
src_impl
=
(
IDirectDrawSurfaceImpl
*
)
src
;
IDirectDrawSurfaceImpl
*
src_impl
=
unsafe_impl_from_IDirectDrawSurface4
(
src
)
;
IDirectDrawSurface7
*
dst7
;
IDirectDrawSurface7
*
dst7
;
IDirectDrawSurfaceImpl
*
dst_impl
;
IDirectDrawSurfaceImpl
*
dst_impl
;
HRESULT
hr
;
HRESULT
hr
;
...
@@ -4879,7 +4879,7 @@ static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid,
...
@@ -4879,7 +4879,7 @@ static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid,
IDirectDrawSurface4
*
surface
,
IDirect3DDevice3
**
device
,
IUnknown
*
outer_unknown
)
IDirectDrawSurface4
*
surface
,
IDirect3DDevice3
**
device
,
IUnknown
*
outer_unknown
)
{
{
IDirectDrawImpl
*
This
=
impl_from_IDirect3D3
(
iface
);
IDirectDrawImpl
*
This
=
impl_from_IDirect3D3
(
iface
);
IDirectDrawSurfaceImpl
*
surface_impl
=
(
IDirectDrawSurfaceImpl
*
)
surface
;
IDirectDrawSurfaceImpl
*
surface_impl
=
unsafe_impl_from_IDirectDrawSurface4
(
surface
)
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"iface %p, riid %s, surface %p, device %p, outer_unknown %p.
\n
"
,
TRACE
(
"iface %p, riid %s, surface %p, device %p, outer_unknown %p.
\n
"
,
...
...
dlls/ddraw/ddraw_private.h
View file @
4582562f
...
@@ -231,6 +231,7 @@ static inline IDirectDrawSurfaceImpl *impl_from_IDirectDrawSurface7(IDirectDrawS
...
@@ -231,6 +231,7 @@ static inline IDirectDrawSurfaceImpl *impl_from_IDirectDrawSurface7(IDirectDrawS
}
}
IDirectDrawSurfaceImpl
*
unsafe_impl_from_IDirectDrawSurface3
(
IDirectDrawSurface3
*
iface
)
DECLSPEC_HIDDEN
;
IDirectDrawSurfaceImpl
*
unsafe_impl_from_IDirectDrawSurface3
(
IDirectDrawSurface3
*
iface
)
DECLSPEC_HIDDEN
;
IDirectDrawSurfaceImpl
*
unsafe_impl_from_IDirectDrawSurface4
(
IDirectDrawSurface4
*
iface
)
DECLSPEC_HIDDEN
;
IDirectDrawSurfaceImpl
*
unsafe_impl_from_IDirectDrawSurface7
(
IDirectDrawSurface7
*
iface
)
DECLSPEC_HIDDEN
;
IDirectDrawSurfaceImpl
*
unsafe_impl_from_IDirectDrawSurface7
(
IDirectDrawSurface7
*
iface
)
DECLSPEC_HIDDEN
;
/* Get the number of bytes per pixel for a given surface */
/* Get the number of bytes per pixel for a given surface */
...
...
dlls/ddraw/device.c
View file @
4582562f
...
@@ -1889,7 +1889,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_SetRenderTarget(IDirect3DDevice3 *if
...
@@ -1889,7 +1889,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_SetRenderTarget(IDirect3DDevice3 *if
IDirectDrawSurface4
*
NewRenderTarget
,
DWORD
Flags
)
IDirectDrawSurface4
*
NewRenderTarget
,
DWORD
Flags
)
{
{
IDirect3DDeviceImpl
*
This
=
device_from_device3
(
iface
);
IDirect3DDeviceImpl
*
This
=
device_from_device3
(
iface
);
IDirectDrawSurfaceImpl
*
Target
=
(
IDirectDrawSurfaceImpl
*
)
NewRenderTarget
;
IDirectDrawSurfaceImpl
*
Target
=
unsafe_impl_from_IDirectDrawSurface4
(
NewRenderTarget
)
;
TRACE
(
"iface %p, target %p, flags %#x.
\n
"
,
iface
,
NewRenderTarget
,
Flags
);
TRACE
(
"iface %p, target %p, flags %#x.
\n
"
,
iface
,
NewRenderTarget
,
Flags
);
...
...
dlls/ddraw/surface.c
View file @
4582562f
...
@@ -3465,6 +3465,13 @@ IDirectDrawSurfaceImpl *unsafe_impl_from_IDirectDrawSurface7(IDirectDrawSurface7
...
@@ -3465,6 +3465,13 @@ IDirectDrawSurfaceImpl *unsafe_impl_from_IDirectDrawSurface7(IDirectDrawSurface7
return
CONTAINING_RECORD
(
iface
,
IDirectDrawSurfaceImpl
,
IDirectDrawSurface7_iface
);
return
CONTAINING_RECORD
(
iface
,
IDirectDrawSurfaceImpl
,
IDirectDrawSurface7_iface
);
}
}
IDirectDrawSurfaceImpl
*
unsafe_impl_from_IDirectDrawSurface4
(
IDirectDrawSurface4
*
iface
)
{
if
(
!
iface
)
return
NULL
;
assert
(
iface
->
lpVtbl
==
(
struct
IDirectDrawSurface4Vtbl
*
)
&
ddraw_surface7_vtbl
);
return
CONTAINING_RECORD
(
iface
,
IDirectDrawSurfaceImpl
,
IDirectDrawSurface7_iface
);
}
IDirectDrawSurfaceImpl
*
unsafe_impl_from_IDirectDrawSurface3
(
IDirectDrawSurface3
*
iface
)
IDirectDrawSurfaceImpl
*
unsafe_impl_from_IDirectDrawSurface3
(
IDirectDrawSurface3
*
iface
)
{
{
if
(
!
iface
)
return
NULL
;
if
(
!
iface
)
return
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