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
d32df839
Commit
d32df839
authored
Oct 17, 2011
by
Ričardas Barkauskas
Committed by
Alexandre Julliard
Oct 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: COM cleanup for IDirect3DDevice2 interface.
parent
1c045cbb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
12 deletions
+17
-12
ddraw.c
dlls/ddraw/ddraw.c
+8
-3
ddraw_private.h
dlls/ddraw/ddraw_private.h
+2
-2
device.c
dlls/ddraw/device.c
+5
-5
executebuffer.c
dlls/ddraw/executebuffer.c
+1
-1
surface.c
dlls/ddraw/surface.c
+1
-1
No files found.
dlls/ddraw/ddraw.c
View file @
d32df839
...
@@ -4359,15 +4359,20 @@ static HRESULT WINAPI d3d2_CreateDevice(IDirect3D2 *iface, REFCLSID riid,
...
@@ -4359,15 +4359,20 @@ static HRESULT WINAPI d3d2_CreateDevice(IDirect3D2 *iface, REFCLSID riid,
{
{
IDirectDrawImpl
*
This
=
impl_from_IDirect3D2
(
iface
);
IDirectDrawImpl
*
This
=
impl_from_IDirect3D2
(
iface
);
IDirectDrawSurfaceImpl
*
surface_impl
=
unsafe_impl_from_IDirectDrawSurface
(
surface
);
IDirectDrawSurfaceImpl
*
surface_impl
=
unsafe_impl_from_IDirectDrawSurface
(
surface
);
IDirect3DDevice7
*
device7
;
IDirect3DDeviceImpl
*
device_impl
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"iface %p, riid %s, surface %p, device %p.
\n
"
,
TRACE
(
"iface %p, riid %s, surface %p, device %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
surface
,
device
);
iface
,
debugstr_guid
(
riid
),
surface
,
device
);
hr
=
d3d7_CreateDevice
(
&
This
->
IDirect3D7_iface
,
riid
,
hr
=
d3d7_CreateDevice
(
&
This
->
IDirect3D7_iface
,
riid
,
surface_impl
?
&
surface_impl
->
IDirectDrawSurface7_iface
:
NULL
,
surface_impl
?
&
surface_impl
->
IDirectDrawSurface7_iface
:
NULL
,
device
?
&
device7
:
NULL
);
(
IDirect3DDevice7
**
)
device
);
if
(
SUCCEEDED
(
hr
))
if
(
*
device
)
*
device
=
(
IDirect3DDevice2
*
)
&
((
IDirect3DDeviceImpl
*
)
*
device
)
->
IDirect3DDevice2_vtbl
;
{
device_impl
=
(
IDirect3DDeviceImpl
*
)
device7
;
*
device
=
&
device_impl
->
IDirect3DDevice2_iface
;
}
return
hr
;
return
hr
;
}
}
...
...
dlls/ddraw/ddraw_private.h
View file @
d32df839
...
@@ -279,7 +279,7 @@ struct IDirect3DDeviceImpl
...
@@ -279,7 +279,7 @@ struct IDirect3DDeviceImpl
/* IUnknown */
/* IUnknown */
const
IDirect3DDevice7Vtbl
*
lpVtbl
;
const
IDirect3DDevice7Vtbl
*
lpVtbl
;
const
IDirect3DDevice3Vtbl
*
IDirect3DDevice3_vtbl
;
const
IDirect3DDevice3Vtbl
*
IDirect3DDevice3_vtbl
;
const
IDirect3DDevice2Vtbl
*
IDirect3DDevice2_vtbl
;
IDirect3DDevice2
IDirect3DDevice2_iface
;
IDirect3DDevice
IDirect3DDevice_iface
;
IDirect3DDevice
IDirect3DDevice_iface
;
LONG
ref
;
LONG
ref
;
...
@@ -332,7 +332,7 @@ static inline IDirect3DDeviceImpl *impl_from_IDirect3DDevice(IDirect3DDevice *if
...
@@ -332,7 +332,7 @@ static inline IDirect3DDeviceImpl *impl_from_IDirect3DDevice(IDirect3DDevice *if
static
inline
IDirect3DDeviceImpl
*
impl_from_IDirect3DDevice2
(
IDirect3DDevice2
*
iface
)
static
inline
IDirect3DDeviceImpl
*
impl_from_IDirect3DDevice2
(
IDirect3DDevice2
*
iface
)
{
{
return
CONTAINING_RECORD
(
iface
,
IDirect3DDeviceImpl
,
IDirect3DDevice2_
vtbl
);
return
CONTAINING_RECORD
(
iface
,
IDirect3DDeviceImpl
,
IDirect3DDevice2_
iface
);
}
}
static
inline
IDirect3DDeviceImpl
*
device_from_device3
(
IDirect3DDevice3
*
iface
)
static
inline
IDirect3DDeviceImpl
*
device_from_device3
(
IDirect3DDevice3
*
iface
)
...
...
dlls/ddraw/device.c
View file @
d32df839
...
@@ -167,7 +167,7 @@ IDirect3DDeviceImpl_7_QueryInterface(IDirect3DDevice7 *iface,
...
@@ -167,7 +167,7 @@ IDirect3DDeviceImpl_7_QueryInterface(IDirect3DDevice7 *iface,
TRACE
(
"(%p) Returning IDirect3DDevice interface at %p
\n
"
,
This
,
*
obj
);
TRACE
(
"(%p) Returning IDirect3DDevice interface at %p
\n
"
,
This
,
*
obj
);
}
}
else
if
(
IsEqualGUID
(
&
IID_IDirect3DDevice2
,
refiid
)
)
{
else
if
(
IsEqualGUID
(
&
IID_IDirect3DDevice2
,
refiid
)
)
{
*
obj
=
&
This
->
IDirect3DDevice2_
vtbl
;
*
obj
=
&
This
->
IDirect3DDevice2_
iface
;
TRACE
(
"(%p) Returning IDirect3DDevice2 interface at %p
\n
"
,
This
,
*
obj
);
TRACE
(
"(%p) Returning IDirect3DDevice2 interface at %p
\n
"
,
This
,
*
obj
);
}
}
else
if
(
IsEqualGUID
(
&
IID_IDirect3DDevice3
,
refiid
)
)
{
else
if
(
IsEqualGUID
(
&
IID_IDirect3DDevice3
,
refiid
)
)
{
...
@@ -581,7 +581,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_1_SwapTextureHandles(IDirect3DDevice *
...
@@ -581,7 +581,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_1_SwapTextureHandles(IDirect3DDevice *
TRACE
(
"iface %p, tex1 %p, tex2 %p.
\n
"
,
iface
,
D3DTex1
,
D3DTex2
);
TRACE
(
"iface %p, tex1 %p, tex2 %p.
\n
"
,
iface
,
D3DTex1
,
D3DTex2
);
return
IDirect3DDevice2_SwapTextureHandles
(
(
IDirect3DDevice2
*
)
&
This
->
IDirect3DDevice2_vtbl
,
t1
,
t2
);
return
IDirect3DDevice2_SwapTextureHandles
(
&
This
->
IDirect3DDevice2_iface
,
t1
,
t2
);
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -1274,7 +1274,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_1_EnumTextureFormats(IDirect3DDevice *
...
@@ -1274,7 +1274,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_1_EnumTextureFormats(IDirect3DDevice *
TRACE
(
"iface %p, callback %p, context %p.
\n
"
,
iface
,
Callback
,
Arg
);
TRACE
(
"iface %p, callback %p, context %p.
\n
"
,
iface
,
Callback
,
Arg
);
return
IDirect3DDevice2_EnumTextureFormats
(
(
IDirect3DDevice2
*
)
&
This
->
IDirect3DDevice2_vtbl
,
Callback
,
Arg
);
return
IDirect3DDevice2_EnumTextureFormats
(
&
This
->
IDirect3DDevice2_iface
,
Callback
,
Arg
);
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -6750,7 +6750,7 @@ IDirect3DDeviceImpl *unsafe_impl_from_IDirect3DDevice2(IDirect3DDevice2 *iface)
...
@@ -6750,7 +6750,7 @@ IDirect3DDeviceImpl *unsafe_impl_from_IDirect3DDevice2(IDirect3DDevice2 *iface)
{
{
if
(
!
iface
)
return
NULL
;
if
(
!
iface
)
return
NULL
;
assert
(
iface
->
lpVtbl
==
&
d3d_device2_vtbl
);
assert
(
iface
->
lpVtbl
==
&
d3d_device2_vtbl
);
return
CONTAINING_RECORD
(
iface
,
IDirect3DDeviceImpl
,
IDirect3DDevice2_
vtbl
);
return
CONTAINING_RECORD
(
iface
,
IDirect3DDeviceImpl
,
IDirect3DDevice2_
iface
);
}
}
IDirect3DDeviceImpl
*
unsafe_impl_from_IDirect3DDevice
(
IDirect3DDevice
*
iface
)
IDirect3DDeviceImpl
*
unsafe_impl_from_IDirect3DDevice
(
IDirect3DDevice
*
iface
)
...
@@ -6803,7 +6803,7 @@ HRESULT d3d_device_init(IDirect3DDeviceImpl *device, IDirectDrawImpl *ddraw, IDi
...
@@ -6803,7 +6803,7 @@ HRESULT d3d_device_init(IDirect3DDeviceImpl *device, IDirectDrawImpl *ddraw, IDi
device
->
lpVtbl
=
&
d3d_device7_fpu_setup_vtbl
;
device
->
lpVtbl
=
&
d3d_device7_fpu_setup_vtbl
;
device
->
IDirect3DDevice3_vtbl
=
&
d3d_device3_vtbl
;
device
->
IDirect3DDevice3_vtbl
=
&
d3d_device3_vtbl
;
device
->
IDirect3DDevice2_
v
tbl
=
&
d3d_device2_vtbl
;
device
->
IDirect3DDevice2_
iface
.
lpV
tbl
=
&
d3d_device2_vtbl
;
device
->
IDirect3DDevice_iface
.
lpVtbl
=
&
d3d_device1_vtbl
;
device
->
IDirect3DDevice_iface
.
lpVtbl
=
&
d3d_device1_vtbl
;
device
->
ref
=
1
;
device
->
ref
=
1
;
device
->
ddraw
=
ddraw
;
device
->
ddraw
=
ddraw
;
...
...
dlls/ddraw/executebuffer.c
View file @
d32df839
...
@@ -292,7 +292,7 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
...
@@ -292,7 +292,7 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
case
D3DOP_STATERENDER
:
{
case
D3DOP_STATERENDER
:
{
int
i
;
int
i
;
IDirect3DDevice2
*
d3d_device2
=
(
IDirect3DDevice2
*
)
&
lpDevice
->
IDirect3DDevice2_vtbl
;
IDirect3DDevice2
*
d3d_device2
=
&
lpDevice
->
IDirect3DDevice2_iface
;
TRACE
(
"STATERENDER (%d)
\n
"
,
count
);
TRACE
(
"STATERENDER (%d)
\n
"
,
count
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
for
(
i
=
0
;
i
<
count
;
i
++
)
{
...
...
dlls/ddraw/surface.c
View file @
d32df839
...
@@ -4557,7 +4557,7 @@ static HRESULT WINAPI d3d_texture1_GetHandle(IDirect3DTexture *iface,
...
@@ -4557,7 +4557,7 @@ static HRESULT WINAPI d3d_texture1_GetHandle(IDirect3DTexture *iface,
TRACE
(
"iface %p, device %p, handle %p.
\n
"
,
iface
,
device
,
handle
);
TRACE
(
"iface %p, device %p, handle %p.
\n
"
,
iface
,
device
,
handle
);
return
d3d_texture2_GetHandle
(
&
This
->
IDirect3DTexture2_iface
,
return
d3d_texture2_GetHandle
(
&
This
->
IDirect3DTexture2_iface
,
device_impl
?
(
IDirect3DDevice2
*
)
&
device_impl
->
IDirect3DDevice2_vtbl
:
NULL
,
handle
);
device_impl
?
&
device_impl
->
IDirect3DDevice2_iface
:
NULL
,
handle
);
}
}
/*****************************************************************************
/*****************************************************************************
...
...
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