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
54a61ae7
Commit
54a61ae7
authored
Jan 28, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Finish the COM cleanup of the IDirect3DDevice8 iface.
parent
dec337ac
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
19 additions
and
19 deletions
+19
-19
buffer.c
dlls/d3d8/buffer.c
+2
-2
cubetexture.c
dlls/d3d8/cubetexture.c
+1
-1
d3d8_private.h
dlls/d3d8/d3d8_private.h
+1
-1
device.c
dlls/d3d8/device.c
+10
-10
directx.c
dlls/d3d8/directx.c
+1
-1
surface.c
dlls/d3d8/surface.c
+1
-1
swapchain.c
dlls/d3d8/swapchain.c
+1
-1
texture.c
dlls/d3d8/texture.c
+1
-1
volumetexture.c
dlls/d3d8/volumetexture.c
+1
-1
No files found.
dlls/d3d8/buffer.c
View file @
54a61ae7
...
...
@@ -277,7 +277,7 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer8Impl *buffer, IDirect3DDevice8Im
return
hr
;
}
buffer
->
parentDevice
=
(
IDirect3DDevice8
*
)
devi
ce
;
buffer
->
parentDevice
=
&
device
->
IDirect3DDevice8_ifa
ce
;
IUnknown_AddRef
(
buffer
->
parentDevice
);
return
D3D_OK
;
...
...
@@ -538,7 +538,7 @@ HRESULT indexbuffer_init(IDirect3DIndexBuffer8Impl *buffer, IDirect3DDevice8Impl
return
hr
;
}
buffer
->
parentDevice
=
(
IDirect3DDevice8
*
)
devi
ce
;
buffer
->
parentDevice
=
&
device
->
IDirect3DDevice8_ifa
ce
;
IUnknown_AddRef
(
buffer
->
parentDevice
);
return
D3D_OK
;
...
...
dlls/d3d8/cubetexture.c
View file @
54a61ae7
...
...
@@ -382,7 +382,7 @@ HRESULT cubetexture_init(IDirect3DCubeTexture8Impl *texture, IDirect3DDevice8Imp
return
hr
;
}
texture
->
parentDevice
=
(
IDirect3DDevice8
*
)
devi
ce
;
texture
->
parentDevice
=
&
device
->
IDirect3DDevice8_ifa
ce
;
IDirect3DDevice8_AddRef
(
texture
->
parentDevice
);
return
D3D_OK
;
...
...
dlls/d3d8/d3d8_private.h
View file @
54a61ae7
...
...
@@ -177,7 +177,7 @@ struct FvfToDecl
struct
IDirect3DDevice8Impl
{
/* IUnknown fields */
const
IDirect3DDevice8Vtbl
*
lpVtbl
;
IDirect3DDevice8
IDirect3DDevice8_iface
;
const
IWineD3DDeviceParentVtbl
*
device_parent_vtbl
;
LONG
ref
;
/* But what about baseVertexIndex in state blocks? hmm... it may be a better idea to pass this to wined3d */
...
...
dlls/d3d8/device.c
View file @
54a61ae7
...
...
@@ -266,7 +266,7 @@ static ULONG WINAPI D3D8CB_DestroySwapChain(IWineD3DSwapChain *swapchain)
static
inline
IDirect3DDevice8Impl
*
impl_from_IDirect3DDevice8
(
IDirect3DDevice8
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirect3DDevice8Impl
,
lpVtbl
);
return
CONTAINING_RECORD
(
iface
,
IDirect3DDevice8Impl
,
IDirect3DDevice8_iface
);
}
static
HRESULT
WINAPI
IDirect3DDevice8Impl_QueryInterface
(
IDirect3DDevice8
*
iface
,
REFIID
riid
,
...
...
@@ -2724,19 +2724,19 @@ static inline struct IDirect3DDevice8Impl *device_from_device_parent(IWineD3DDev
static
HRESULT
STDMETHODCALLTYPE
device_parent_QueryInterface
(
IWineD3DDeviceParent
*
iface
,
REFIID
riid
,
void
**
object
)
{
struct
IDirect3DDevice8Impl
*
This
=
device_from_device_parent
(
iface
);
return
IDirect3DDevice8Impl_QueryInterface
(
(
IDirect3DDevice8
*
)
This
,
riid
,
object
);
return
IDirect3DDevice8Impl_QueryInterface
(
&
This
->
IDirect3DDevice8_iface
,
riid
,
object
);
}
static
ULONG
STDMETHODCALLTYPE
device_parent_AddRef
(
IWineD3DDeviceParent
*
iface
)
{
struct
IDirect3DDevice8Impl
*
This
=
device_from_device_parent
(
iface
);
return
IDirect3DDevice8Impl_AddRef
(
(
IDirect3DDevice8
*
)
This
);
return
IDirect3DDevice8Impl_AddRef
(
&
This
->
IDirect3DDevice8_iface
);
}
static
ULONG
STDMETHODCALLTYPE
device_parent_Release
(
IWineD3DDeviceParent
*
iface
)
{
struct
IDirect3DDevice8Impl
*
This
=
device_from_device_parent
(
iface
);
return
IDirect3DDevice8Impl_Release
(
(
IDirect3DDevice8
*
)
This
);
return
IDirect3DDevice8Impl_Release
(
&
This
->
IDirect3DDevice8_iface
);
}
/* IWineD3DDeviceParent methods */
...
...
@@ -2797,7 +2797,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice
"
\t
multisample_quality %u, lockable %u, surface %p
\n
"
,
iface
,
superior
,
width
,
height
,
format
,
multisample_type
,
multisample_quality
,
lockable
,
surface
);
hr
=
IDirect3DDevice8_CreateRenderTarget
(
(
IDirect3DDevice8
*
)
This
,
width
,
height
,
hr
=
IDirect3DDevice8_CreateRenderTarget
(
&
This
->
IDirect3DDevice8_iface
,
width
,
height
,
d3dformat_from_wined3dformat
(
format
),
multisample_type
,
lockable
,
(
IDirect3DSurface8
**
)
&
d3d_surface
);
if
(
FAILED
(
hr
))
{
...
...
@@ -2808,7 +2808,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice
*
surface
=
d3d_surface
->
wineD3DSurface
;
IWineD3DSurface_AddRef
(
*
surface
);
d3d_surface
->
container
=
(
IUnknown
*
)
This
;
d3d_surface
->
container
=
(
IUnknown
*
)
&
This
->
IDirect3DDevice8_iface
;
/* Implicit surfaces are created with an refcount of 0 */
IUnknown_Release
((
IUnknown
*
)
d3d_surface
);
...
...
@@ -2827,7 +2827,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3
"
\t
multisample_quality %u, discard %u, surface %p
\n
"
,
iface
,
width
,
height
,
format
,
multisample_type
,
multisample_quality
,
discard
,
surface
);
hr
=
IDirect3DDevice8_CreateDepthStencilSurface
(
(
IDirect3DDevice8
*
)
This
,
width
,
height
,
hr
=
IDirect3DDevice8_CreateDepthStencilSurface
(
&
This
->
IDirect3DDevice8_iface
,
width
,
height
,
d3dformat_from_wined3dformat
(
format
),
multisample_type
,
(
IDirect3DSurface8
**
)
&
d3d_surface
);
if
(
FAILED
(
hr
))
{
...
...
@@ -2838,7 +2838,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3
*
surface
=
d3d_surface
->
wineD3DSurface
;
IWineD3DSurface_AddRef
(
*
surface
);
d3d_surface
->
container
=
(
IUnknown
*
)
This
;
d3d_surface
->
container
=
(
IUnknown
*
)
&
This
->
IDirect3DDevice8_iface
;
/* Implicit surfaces are created with an refcount of 0 */
IUnknown_Release
((
IUnknown
*
)
d3d_surface
);
...
...
@@ -2910,7 +2910,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSwapChain(IWineD3DDevicePar
local_parameters
.
FullScreen_RefreshRateInHz
=
present_parameters
->
FullScreen_RefreshRateInHz
;
local_parameters
.
FullScreen_PresentationInterval
=
present_parameters
->
PresentationInterval
;
hr
=
IDirect3DDevice8_CreateAdditionalSwapChain
(
(
IDirect3DDevice8
*
)
This
,
hr
=
IDirect3DDevice8_CreateAdditionalSwapChain
(
&
This
->
IDirect3DDevice8_iface
,
&
local_parameters
,
(
IDirect3DSwapChain8
**
)
&
d3d_swapchain
);
if
(
FAILED
(
hr
))
{
...
...
@@ -2974,7 +2974,7 @@ HRESULT device_init(IDirect3DDevice8Impl *device, IWineD3D *wined3d, UINT adapte
WINED3DPRESENT_PARAMETERS
wined3d_parameters
;
HRESULT
hr
;
device
->
lpVtbl
=
&
Direct3DDevice8_Vtbl
;
device
->
IDirect3DDevice8_iface
.
lpVtbl
=
&
Direct3DDevice8_Vtbl
;
device
->
device_parent_vtbl
=
&
d3d8_wined3d_device_parent_vtbl
;
device
->
ref
=
1
;
device
->
handle_table
.
entries
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
...
...
dlls/d3d8/directx.c
View file @
54a61ae7
...
...
@@ -377,7 +377,7 @@ static HRESULT WINAPI IDirect3D8Impl_CreateDevice(IDirect3D8 *iface, UINT adapte
}
TRACE
(
"Created device %p.
\n
"
,
object
);
*
device
=
(
IDirect3DDevice8
*
)
object
;
*
device
=
&
object
->
IDirect3DDevice8_iface
;
return
D3D_OK
;
}
...
...
dlls/d3d8/surface.c
View file @
54a61ae7
...
...
@@ -311,7 +311,7 @@ HRESULT surface_init(IDirect3DSurface8Impl *surface, IDirect3DDevice8Impl *devic
return
hr
;
}
surface
->
parentDevice
=
(
IDirect3DDevice8
*
)
devi
ce
;
surface
->
parentDevice
=
&
device
->
IDirect3DDevice8_ifa
ce
;
IUnknown_AddRef
(
surface
->
parentDevice
);
return
D3D_OK
;
...
...
dlls/d3d8/swapchain.c
View file @
54a61ae7
...
...
@@ -166,7 +166,7 @@ HRESULT swapchain_init(IDirect3DSwapChain8Impl *swapchain, IDirect3DDevice8Impl
return
hr
;
}
swapchain
->
parentDevice
=
(
IDirect3DDevice8
*
)
devi
ce
;
swapchain
->
parentDevice
=
&
device
->
IDirect3DDevice8_ifa
ce
;
IDirect3DDevice8_AddRef
(
swapchain
->
parentDevice
);
return
D3D_OK
;
...
...
dlls/d3d8/texture.c
View file @
54a61ae7
...
...
@@ -369,7 +369,7 @@ HRESULT texture_init(IDirect3DTexture8Impl *texture, IDirect3DDevice8Impl *devic
return
hr
;
}
texture
->
parentDevice
=
(
IDirect3DDevice8
*
)
devi
ce
;
texture
->
parentDevice
=
&
device
->
IDirect3DDevice8_ifa
ce
;
IDirect3DDevice8_AddRef
(
texture
->
parentDevice
);
return
D3D_OK
;
...
...
dlls/d3d8/volumetexture.c
View file @
54a61ae7
...
...
@@ -370,7 +370,7 @@ HRESULT volumetexture_init(IDirect3DVolumeTexture8Impl *texture, IDirect3DDevice
return
hr
;
}
texture
->
parentDevice
=
(
IDirect3DDevice8
*
)
devi
ce
;
texture
->
parentDevice
=
&
device
->
IDirect3DDevice8_ifa
ce
;
IDirect3DDevice8_AddRef
(
texture
->
parentDevice
);
return
D3D_OK
;
...
...
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