Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
472a8f7a
Commit
472a8f7a
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 IDirect3DDevice7 interface.
parent
7dc08745
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
17 additions
and
17 deletions
+17
-17
ddraw.c
dlls/ddraw/ddraw.c
+1
-1
ddraw_private.h
dlls/ddraw/ddraw_private.h
+2
-2
device.c
dlls/ddraw/device.c
+0
-0
executebuffer.c
dlls/ddraw/executebuffer.c
+3
-3
light.c
dlls/ddraw/light.c
+3
-3
main.c
dlls/ddraw/main.c
+1
-1
material.c
dlls/ddraw/material.c
+1
-1
vertexbuffer.c
dlls/ddraw/vertexbuffer.c
+3
-3
viewport.c
dlls/ddraw/viewport.c
+3
-3
No files found.
dlls/ddraw/ddraw.c
View file @
472a8f7a
...
@@ -4328,7 +4328,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid,
...
@@ -4328,7 +4328,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid,
}
}
TRACE
(
"Created device %p.
\n
"
,
object
);
TRACE
(
"Created device %p.
\n
"
,
object
);
*
device
=
(
IDirect3DDevice7
*
)
object
;
*
device
=
&
object
->
IDirect3DDevice7_iface
;
LeaveCriticalSection
(
&
ddraw_cs
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
D3D_OK
;
return
D3D_OK
;
...
...
dlls/ddraw/ddraw_private.h
View file @
472a8f7a
...
@@ -277,7 +277,7 @@ void *ddraw_get_object(struct ddraw_handle_table *t, DWORD handle, enum ddraw_ha
...
@@ -277,7 +277,7 @@ void *ddraw_get_object(struct ddraw_handle_table *t, DWORD handle, enum ddraw_ha
struct
IDirect3DDeviceImpl
struct
IDirect3DDeviceImpl
{
{
/* IUnknown */
/* IUnknown */
const
IDirect3DDevice7Vtbl
*
lpVtbl
;
IDirect3DDevice7
IDirect3DDevice7_iface
;
IDirect3DDevice3
IDirect3DDevice3_iface
;
IDirect3DDevice3
IDirect3DDevice3_iface
;
IDirect3DDevice2
IDirect3DDevice2_iface
;
IDirect3DDevice2
IDirect3DDevice2_iface
;
IDirect3DDevice
IDirect3DDevice_iface
;
IDirect3DDevice
IDirect3DDevice_iface
;
...
@@ -342,7 +342,7 @@ static inline IDirect3DDeviceImpl *impl_from_IDirect3DDevice3(IDirect3DDevice3 *
...
@@ -342,7 +342,7 @@ static inline IDirect3DDeviceImpl *impl_from_IDirect3DDevice3(IDirect3DDevice3 *
static
inline
IDirect3DDeviceImpl
*
impl_from_IDirect3DDevice7
(
IDirect3DDevice7
*
iface
)
static
inline
IDirect3DDeviceImpl
*
impl_from_IDirect3DDevice7
(
IDirect3DDevice7
*
iface
)
{
{
return
CONTAINING_RECORD
(
iface
,
IDirect3DDeviceImpl
,
lpVtbl
);
return
CONTAINING_RECORD
(
iface
,
IDirect3DDeviceImpl
,
IDirect3DDevice7_iface
);
}
}
IDirect3DDeviceImpl
*
unsafe_impl_from_IDirect3DDevice
(
IDirect3DDevice
*
iface
)
DECLSPEC_HIDDEN
;
IDirect3DDeviceImpl
*
unsafe_impl_from_IDirect3DDevice
(
IDirect3DDevice
*
iface
)
DECLSPEC_HIDDEN
;
...
...
dlls/ddraw/device.c
View file @
472a8f7a
This diff is collapsed.
Click to expand it.
dlls/ddraw/executebuffer.c
View file @
472a8f7a
...
@@ -157,7 +157,7 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
...
@@ -157,7 +157,7 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
* enable it before drawing. This overwrites any ALPHA*
* enable it before drawing. This overwrites any ALPHA*
* render state. */
* render state. */
wined3d_device_set_render_state
(
lpDevice
->
wined3d_device
,
WINED3DRS_COLORKEYENABLE
,
1
);
wined3d_device_set_render_state
(
lpDevice
->
wined3d_device
,
WINED3DRS_COLORKEYENABLE
,
1
);
IDirect3DDevice7_DrawIndexedPrimitive
(
(
IDirect3DDevice7
*
)
lpDevi
ce
,
IDirect3DDevice7_DrawIndexedPrimitive
(
&
lpDevice
->
IDirect3DDevice7_ifa
ce
,
D3DPT_TRIANGLELIST
,
D3DFVF_TLVERTEX
,
tl_vx
,
0
,
This
->
indices
,
count
*
3
,
0
);
D3DPT_TRIANGLELIST
,
D3DFVF_TLVERTEX
,
tl_vx
,
0
,
This
->
indices
,
count
*
3
,
0
);
}
break
;
}
break
;
...
@@ -216,7 +216,7 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
...
@@ -216,7 +216,7 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
lpDevice
->
view
=
ci
->
u2
.
dwArg
[
0
];
lpDevice
->
view
=
ci
->
u2
.
dwArg
[
0
];
if
(
ci
->
u1
.
dtstTransformStateType
==
D3DTRANSFORMSTATE_PROJECTION
)
if
(
ci
->
u1
.
dtstTransformStateType
==
D3DTRANSFORMSTATE_PROJECTION
)
lpDevice
->
proj
=
ci
->
u2
.
dwArg
[
0
];
lpDevice
->
proj
=
ci
->
u2
.
dwArg
[
0
];
IDirect3DDevice7_SetTransform
(
(
IDirect3DDevice7
*
)
lpDevi
ce
,
IDirect3DDevice7_SetTransform
(
&
lpDevice
->
IDirect3DDevice7_ifa
ce
,
ci
->
u1
.
dtstTransformStateType
,
m
);
ci
->
u1
.
dtstTransformStateType
,
m
);
}
}
...
@@ -283,7 +283,7 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
...
@@ -283,7 +283,7 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
break
;
break
;
}
}
IDirect3DDevice7_SetRenderState
(
(
IDirect3DDevice7
*
)
lpDevi
ce
,
rs
,
ci
->
u2
.
dwArg
[
0
]);
IDirect3DDevice7_SetRenderState
(
&
lpDevice
->
IDirect3DDevice7_ifa
ce
,
rs
,
ci
->
u2
.
dwArg
[
0
]);
}
}
instr
+=
size
;
instr
+=
size
;
...
...
dlls/ddraw/light.c
View file @
472a8f7a
...
@@ -41,7 +41,7 @@ static void light_update(IDirect3DLightImpl *light)
...
@@ -41,7 +41,7 @@ static void light_update(IDirect3DLightImpl *light)
if
(
!
light
->
active_viewport
||
!
light
->
active_viewport
->
active_device
)
return
;
if
(
!
light
->
active_viewport
||
!
light
->
active_viewport
->
active_device
)
return
;
device
=
light
->
active_viewport
->
active_device
;
device
=
light
->
active_viewport
->
active_device
;
IDirect3DDevice7_SetLight
(
(
IDirect3DDevice7
*
)
devi
ce
,
light
->
dwLightIndex
,
&
light
->
light7
);
IDirect3DDevice7_SetLight
(
&
device
->
IDirect3DDevice7_ifa
ce
,
light
->
dwLightIndex
,
&
light
->
light7
);
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -62,7 +62,7 @@ void light_activate(IDirect3DLightImpl *light)
...
@@ -62,7 +62,7 @@ void light_activate(IDirect3DLightImpl *light)
light_update
(
light
);
light_update
(
light
);
if
(
!
(
light
->
light
.
dwFlags
&
D3DLIGHT_ACTIVE
))
if
(
!
(
light
->
light
.
dwFlags
&
D3DLIGHT_ACTIVE
))
{
{
IDirect3DDevice7_LightEnable
(
(
IDirect3DDevice7
*
)
devi
ce
,
light
->
dwLightIndex
,
TRUE
);
IDirect3DDevice7_LightEnable
(
&
device
->
IDirect3DDevice7_ifa
ce
,
light
->
dwLightIndex
,
TRUE
);
light
->
light
.
dwFlags
|=
D3DLIGHT_ACTIVE
;
light
->
light
.
dwFlags
|=
D3DLIGHT_ACTIVE
;
}
}
}
}
...
@@ -86,7 +86,7 @@ void light_deactivate(IDirect3DLightImpl *light)
...
@@ -86,7 +86,7 @@ void light_deactivate(IDirect3DLightImpl *light)
/* If was not active, activate it */
/* If was not active, activate it */
if
(
light
->
light
.
dwFlags
&
D3DLIGHT_ACTIVE
)
if
(
light
->
light
.
dwFlags
&
D3DLIGHT_ACTIVE
)
{
{
IDirect3DDevice7_LightEnable
(
(
IDirect3DDevice7
*
)
devi
ce
,
light
->
dwLightIndex
,
FALSE
);
IDirect3DDevice7_LightEnable
(
&
device
->
IDirect3DDevice7_ifa
ce
,
light
->
dwLightIndex
,
FALSE
);
light
->
light
.
dwFlags
&=
~
D3DLIGHT_ACTIVE
;
light
->
light
.
dwFlags
&=
~
D3DLIGHT_ACTIVE
;
}
}
}
}
...
...
dlls/ddraw/main.c
View file @
472a8f7a
...
@@ -960,7 +960,7 @@ DllMain(HINSTANCE hInstDLL,
...
@@ -960,7 +960,7 @@ DllMain(HINSTANCE hInstDLL,
if
(
ddraw
->
d3ddevice
)
if
(
ddraw
->
d3ddevice
)
{
{
WARN
(
"DDraw %p has d3ddevice %p attached
\n
"
,
ddraw
,
ddraw
->
d3ddevice
);
WARN
(
"DDraw %p has d3ddevice %p attached
\n
"
,
ddraw
,
ddraw
->
d3ddevice
);
while
(
IDirect3DDevice7_Release
(
(
IDirect3DDevice7
*
)
ddraw
->
d3ddevi
ce
));
while
(
IDirect3DDevice7_Release
(
&
ddraw
->
d3ddevice
->
IDirect3DDevice7_ifa
ce
));
}
}
/* Try to release the objects
/* Try to release the objects
...
...
dlls/ddraw/material.c
View file @
472a8f7a
...
@@ -464,7 +464,7 @@ void material_activate(IDirect3DMaterialImpl* This)
...
@@ -464,7 +464,7 @@ void material_activate(IDirect3DMaterialImpl* This)
d3d7mat
.
u3
.
emissive
=
This
->
mat
.
u3
.
emissive
;
d3d7mat
.
u3
.
emissive
=
This
->
mat
.
u3
.
emissive
;
d3d7mat
.
u4
.
power
=
This
->
mat
.
u4
.
power
;
d3d7mat
.
u4
.
power
=
This
->
mat
.
u4
.
power
;
IDirect3DDevice7_SetMaterial
(
(
IDirect3DDevice7
*
)
This
->
active_devi
ce
,
&
d3d7mat
);
IDirect3DDevice7_SetMaterial
(
&
This
->
active_device
->
IDirect3DDevice7_ifa
ce
,
&
d3d7mat
);
}
}
static
const
struct
IDirect3DMaterial3Vtbl
d3d_material3_vtbl
=
static
const
struct
IDirect3DMaterial3Vtbl
d3d_material3_vtbl
=
...
...
dlls/ddraw/vertexbuffer.c
View file @
472a8f7a
...
@@ -361,8 +361,8 @@ static HRESULT WINAPI IDirect3DVertexBufferImpl_1_ProcessVertices(IDirect3DVerte
...
@@ -361,8 +361,8 @@ static HRESULT WINAPI IDirect3DVertexBufferImpl_1_ProcessVertices(IDirect3DVerte
iface
,
VertexOp
,
DestIndex
,
Count
,
SrcBuffer
,
SrcIndex
,
device
,
Flags
);
iface
,
VertexOp
,
DestIndex
,
Count
,
SrcBuffer
,
SrcIndex
,
device
,
Flags
);
return
IDirect3DVertexBuffer7_ProcessVertices
(
&
This
->
IDirect3DVertexBuffer7_iface
,
VertexOp
,
return
IDirect3DVertexBuffer7_ProcessVertices
(
&
This
->
IDirect3DVertexBuffer7_iface
,
VertexOp
,
DestIndex
,
Count
,
&
Src
->
IDirect3DVertexBuffer7_iface
,
SrcIndex
,
(
IDirect3DDevice7
*
)
device_impl
,
DestIndex
,
Count
,
&
Src
->
IDirect3DVertexBuffer7_iface
,
SrcIndex
,
Flags
);
device_impl
?
&
device_impl
->
IDirect3DDevice7_iface
:
NULL
,
Flags
);
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -459,7 +459,7 @@ static HRESULT WINAPI IDirect3DVertexBufferImpl_1_Optimize(IDirect3DVertexBuffer
...
@@ -459,7 +459,7 @@ static HRESULT WINAPI IDirect3DVertexBufferImpl_1_Optimize(IDirect3DVertexBuffer
TRACE
(
"iface %p, device %p, flags %#x.
\n
"
,
iface
,
device
,
Flags
);
TRACE
(
"iface %p, device %p, flags %#x.
\n
"
,
iface
,
device
,
Flags
);
return
IDirect3DVertexBuffer7_Optimize
(
&
This
->
IDirect3DVertexBuffer7_iface
,
return
IDirect3DVertexBuffer7_Optimize
(
&
This
->
IDirect3DVertexBuffer7_iface
,
(
IDirect3DDevice7
*
)
device_impl
,
Flags
);
device_impl
?
&
device_impl
->
IDirect3DDevice7_iface
:
NULL
,
Flags
);
}
}
/*****************************************************************************
/*****************************************************************************
...
...
dlls/ddraw/viewport.c
View file @
472a8f7a
...
@@ -72,7 +72,7 @@ void viewport_activate(IDirect3DViewportImpl *This, BOOL ignore_lights)
...
@@ -72,7 +72,7 @@ void viewport_activate(IDirect3DViewportImpl *This, BOOL ignore_lights)
}
}
/* And also set the viewport */
/* And also set the viewport */
IDirect3DDevice7_SetViewport
(
(
IDirect3DDevice7
*
)
This
->
active_devi
ce
,
&
vp
);
IDirect3DDevice7_SetViewport
(
&
This
->
active_device
->
IDirect3DDevice7_ifa
ce
,
&
vp
);
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -692,7 +692,7 @@ static HRESULT WINAPI IDirect3DViewportImpl_Clear(IDirect3DViewport3 *iface,
...
@@ -692,7 +692,7 @@ static HRESULT WINAPI IDirect3DViewportImpl_Clear(IDirect3DViewport3 *iface,
afterwards. */
afterwards. */
viewport_activate
(
This
,
TRUE
);
viewport_activate
(
This
,
TRUE
);
hr
=
IDirect3DDevice7_Clear
(
(
IDirect3DDevice7
*
)
This
->
active_devi
ce
,
dwCount
,
lpRects
,
hr
=
IDirect3DDevice7_Clear
(
&
This
->
active_device
->
IDirect3DDevice7_ifa
ce
,
dwCount
,
lpRects
,
dwFlags
&
(
D3DCLEAR_ZBUFFER
|
D3DCLEAR_TARGET
),
color
,
1
.
0
,
0x00000000
);
dwFlags
&
(
D3DCLEAR_ZBUFFER
|
D3DCLEAR_TARGET
),
color
,
1
.
0
,
0x00000000
);
IDirect3DDevice3_GetCurrentViewport
(
d3d_device3
,
&
current_viewport
);
IDirect3DDevice3_GetCurrentViewport
(
d3d_device3
,
&
current_viewport
);
...
@@ -1075,7 +1075,7 @@ IDirect3DViewportImpl_Clear2(IDirect3DViewport3 *iface,
...
@@ -1075,7 +1075,7 @@ IDirect3DViewportImpl_Clear2(IDirect3DViewport3 *iface,
* one will be restored afterwards. */
* one will be restored afterwards. */
viewport_activate
(
This
,
TRUE
);
viewport_activate
(
This
,
TRUE
);
hr
=
IDirect3DDevice7_Clear
(
(
IDirect3DDevice7
*
)
This
->
active_devi
ce
,
hr
=
IDirect3DDevice7_Clear
(
&
This
->
active_device
->
IDirect3DDevice7_ifa
ce
,
dwCount
,
lpRects
,
dwFlags
,
dwColor
,
dvZ
,
dwStencil
);
dwCount
,
lpRects
,
dwFlags
,
dwColor
,
dvZ
,
dwStencil
);
IDirect3DDevice3_GetCurrentViewport
(
d3d_device3
,
&
current_viewport
);
IDirect3DDevice3_GetCurrentViewport
(
d3d_device3
,
&
current_viewport
);
if
(
current_viewport
)
{
if
(
current_viewport
)
{
...
...
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