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
f879176b
Commit
f879176b
authored
Feb 09, 2009
by
Vincent Pelletier
Committed by
Alexandre Julliard
Feb 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Use ddraw_from_d3d7 to make a (IDirectDrawImpl *) from a (IDirect3D7 *).
parent
95b8f49d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
device.c
dlls/ddraw/device.c
+3
-3
d3d.c
dlls/ddraw/tests/d3d.c
+7
-0
No files found.
dlls/ddraw/device.c
View file @
f879176b
...
...
@@ -1790,7 +1790,7 @@ Thunk_IDirect3DDeviceImpl_3_GetDirect3D(IDirect3DDevice3 *iface,
ret
=
IDirect3DDevice7_GetDirect3D
((
IDirect3DDevice7
*
)
This
,
&
ret_ptr
);
if
(
ret
!=
D3D_OK
)
return
ret
;
*
Direct3D3
=
ret_ptr
?
(
IDirect3D3
*
)
&
((
IDirectDrawImpl
*
)
ret_ptr
)
->
IDirect3D3_vtbl
:
NULL
;
*
Direct3D3
=
ret_ptr
?
(
IDirect3D3
*
)
&
ddraw_from_d3d7
(
ret_ptr
)
->
IDirect3D3_vtbl
:
NULL
;
TRACE
(
" returning interface %p
\n
"
,
*
Direct3D3
);
return
D3D_OK
;
}
...
...
@@ -1807,7 +1807,7 @@ Thunk_IDirect3DDeviceImpl_2_GetDirect3D(IDirect3DDevice2 *iface,
ret
=
IDirect3DDevice7_GetDirect3D
((
IDirect3DDevice7
*
)
This
,
&
ret_ptr
);
if
(
ret
!=
D3D_OK
)
return
ret
;
*
Direct3D2
=
ret_ptr
?
(
IDirect3D2
*
)
&
((
IDirectDrawImpl
*
)
ret_ptr
)
->
IDirect3D2_vtbl
:
NULL
;
*
Direct3D2
=
ret_ptr
?
(
IDirect3D2
*
)
&
ddraw_from_d3d7
(
ret_ptr
)
->
IDirect3D2_vtbl
:
NULL
;
TRACE
(
" returning interface %p
\n
"
,
*
Direct3D2
);
return
D3D_OK
;
}
...
...
@@ -1824,7 +1824,7 @@ Thunk_IDirect3DDeviceImpl_1_GetDirect3D(IDirect3DDevice *iface,
ret
=
IDirect3DDevice7_GetDirect3D
((
IDirect3DDevice7
*
)
This
,
&
ret_ptr
);
if
(
ret
!=
D3D_OK
)
return
ret
;
*
Direct3D
=
ret_ptr
?
(
IDirect3D
*
)
&
((
IDirectDrawImpl
*
)
ret_ptr
)
->
IDirect3D_vtbl
:
NULL
;
*
Direct3D
=
ret_ptr
?
(
IDirect3D
*
)
&
ddraw_from_d3d7
(
ret_ptr
)
->
IDirect3D_vtbl
:
NULL
;
TRACE
(
" returning interface %p
\n
"
,
*
Direct3D
);
return
D3D_OK
;
}
...
...
dlls/ddraw/tests/d3d.c
View file @
f879176b
...
...
@@ -1033,6 +1033,7 @@ static void Direct3D1Test(void)
D3DVIEWPORT
vp_data
;
D3DINSTRUCTION
*
instr
;
D3DBRANCH
*
branch
;
IDirect3D
*
Direct3D_alt
;
unsigned
int
idx
=
0
;
static
struct
v_in
testverts
[]
=
{
{
0
.
0
,
0
.
0
,
0
.
0
},
{
1
.
0
,
1
.
0
,
1
.
0
},
{
-
1
.
0
,
-
1
.
0
,
-
1
.
0
},
...
...
@@ -1050,6 +1051,12 @@ static void Direct3D1Test(void)
D3DTRANSFORMDATA
transformdata
;
DWORD
i
=
FALSE
;
/* Interface consistency check. */
hr
=
IDirect3DDevice_GetDirect3D
(
Direct3DDevice1
,
&
Direct3D_alt
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice_GetDirect3D failed: %08x
\n
"
,
hr
);
if
(
hr
==
D3D_OK
)
ok
(
Direct3D_alt
==
Direct3D1
,
"Direct3D1 struct pointer missmatch: %p != %p
\n
"
,
Direct3D_alt
,
Direct3D1
);
memset
(
&
desc
,
0
,
sizeof
(
desc
));
desc
.
dwSize
=
sizeof
(
desc
);
hr
=
IDirect3DExecuteBuffer_Lock
(
ExecuteBuffer
,
&
desc
);
...
...
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