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
b3ced2fa
Commit
b3ced2fa
authored
Jan 18, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 18, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Avoid some unsafe IDirect3D7 iface to IDirectDrawImpl transitions.
parent
19fa0b32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
30 deletions
+24
-30
device.c
dlls/ddraw/device.c
+24
-30
No files found.
dlls/ddraw/device.c
View file @
b3ced2fa
...
...
@@ -1727,56 +1727,50 @@ IDirect3DDeviceImpl_7_GetDirect3D(IDirect3DDevice7 *iface,
return
D3D_OK
;
}
static
HRESULT
WINAPI
Thunk_IDirect3DDeviceImpl_3_GetDirect3D
(
IDirect3DDevice3
*
iface
,
IDirect3D3
**
Direct3D3
)
static
HRESULT
WINAPI
IDirect3DDeviceImpl_3_GetDirect3D
(
IDirect3DDevice3
*
iface
,
IDirect3D3
**
Direct3D3
)
{
IDirect3DDeviceImpl
*
This
=
device_from_device3
(
iface
);
HRESULT
ret
;
IDirect3D7
*
ret_ptr
;
TRACE
(
"iface %p, d3d %p.
\n
"
,
iface
,
Direct3D3
);
ret
=
IDirect3DDevice7_GetDirect3D
((
IDirect3DDevice7
*
)
This
,
&
ret_ptr
);
if
(
ret
!=
D3D_OK
)
return
ret
;
*
Direct3D3
=
ret_ptr
?
(
IDirect3D3
*
)
&
ddraw_from_d3d7
(
ret_ptr
)
->
IDirect3D3_vtbl
:
NULL
;
if
(
!
Direct3D3
)
return
DDERR_INVALIDPARAMS
;
IDirect3D3_AddRef
((
IDirect3D3
*
)
&
This
->
ddraw
->
IDirect3D3_vtbl
);
*
Direct3D3
=
(
IDirect3D3
*
)
&
This
->
ddraw
->
IDirect3D3_vtbl
;
TRACE
(
" returning interface %p
\n
"
,
*
Direct3D3
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
Thunk_IDirect3DDeviceImpl_2_GetDirect3D
(
IDirect3DDevice2
*
iface
,
IDirect3D2
**
Direct3D2
)
static
HRESULT
WINAPI
IDirect3DDeviceImpl_2_GetDirect3D
(
IDirect3DDevice2
*
iface
,
IDirect3D2
**
Direct3D2
)
{
IDirect3DDeviceImpl
*
This
=
device_from_device2
(
iface
);
HRESULT
ret
;
IDirect3D7
*
ret_ptr
;
TRACE
(
"iface %p, d3d %p.
\n
"
,
iface
,
Direct3D2
);
ret
=
IDirect3DDevice7_GetDirect3D
((
IDirect3DDevice7
*
)
This
,
&
ret_ptr
);
if
(
ret
!=
D3D_OK
)
return
ret
;
*
Direct3D2
=
ret_ptr
?
(
IDirect3D2
*
)
&
ddraw_from_d3d7
(
ret_ptr
)
->
IDirect3D2_vtbl
:
NULL
;
if
(
!
Direct3D2
)
return
DDERR_INVALIDPARAMS
;
IDirect3D2_AddRef
((
IDirect3D2
*
)
&
This
->
ddraw
->
IDirect3D2_vtbl
);
*
Direct3D2
=
(
IDirect3D2
*
)
&
This
->
ddraw
->
IDirect3D2_vtbl
;
TRACE
(
" returning interface %p
\n
"
,
*
Direct3D2
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
Thunk_IDirect3DDeviceImpl_1_GetDirect3D
(
IDirect3DDevice
*
iface
,
IDirect3D
**
Direct3D
)
static
HRESULT
WINAPI
IDirect3DDeviceImpl_1_GetDirect3D
(
IDirect3DDevice
*
iface
,
IDirect3D
**
Direct3D
)
{
IDirect3DDeviceImpl
*
This
=
device_from_device1
(
iface
);
HRESULT
ret
;
IDirect3D7
*
ret_ptr
;
TRACE
(
"iface %p, d3d %p.
\n
"
,
iface
,
Direct3D
);
ret
=
IDirect3DDevice7_GetDirect3D
((
IDirect3DDevice7
*
)
This
,
&
ret_ptr
);
if
(
ret
!=
D3D_OK
)
return
ret
;
*
Direct3D
=
ret_ptr
?
(
IDirect3D
*
)
&
ddraw_from_d3d7
(
ret_ptr
)
->
IDirect3D_vtbl
:
NULL
;
if
(
!
Direct3D
)
return
DDERR_INVALIDPARAMS
;
IDirect3D_AddRef
((
IDirect3D
*
)
&
This
->
ddraw
->
IDirect3D_vtbl
);
*
Direct3D
=
(
IDirect3D
*
)
&
This
->
ddraw
->
IDirect3D_vtbl
;
TRACE
(
" returning interface %p
\n
"
,
*
Direct3D
);
return
D3D_OK
;
}
...
...
@@ -6806,7 +6800,7 @@ static const struct IDirect3DDevice3Vtbl d3d_device3_vtbl =
Thunk_IDirect3DDeviceImpl_3_EnumTextureFormats
,
Thunk_IDirect3DDeviceImpl_3_BeginScene
,
Thunk_IDirect3DDeviceImpl_3_EndScene
,
Thunk_
IDirect3DDeviceImpl_3_GetDirect3D
,
IDirect3DDeviceImpl_3_GetDirect3D
,
IDirect3DDeviceImpl_3_SetCurrentViewport
,
IDirect3DDeviceImpl_3_GetCurrentViewport
,
Thunk_IDirect3DDeviceImpl_3_SetRenderTarget
,
...
...
@@ -6855,7 +6849,7 @@ static const struct IDirect3DDevice2Vtbl d3d_device2_vtbl =
IDirect3DDeviceImpl_2_EnumTextureFormats
,
Thunk_IDirect3DDeviceImpl_2_BeginScene
,
Thunk_IDirect3DDeviceImpl_2_EndScene
,
Thunk_
IDirect3DDeviceImpl_2_GetDirect3D
,
IDirect3DDeviceImpl_2_GetDirect3D
,
Thunk_IDirect3DDeviceImpl_2_SetCurrentViewport
,
Thunk_IDirect3DDeviceImpl_2_GetCurrentViewport
,
Thunk_IDirect3DDeviceImpl_2_SetRenderTarget
,
...
...
@@ -6903,7 +6897,7 @@ static const struct IDirect3DDeviceVtbl d3d_device1_vtbl =
IDirect3DDeviceImpl_1_DeleteMatrix
,
Thunk_IDirect3DDeviceImpl_1_BeginScene
,
Thunk_IDirect3DDeviceImpl_1_EndScene
,
Thunk_
IDirect3DDeviceImpl_1_GetDirect3D
IDirect3DDeviceImpl_1_GetDirect3D
};
/*****************************************************************************
...
...
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