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
14744c44
Commit
14744c44
authored
Jul 18, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
Jul 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Don't permit the enumeration of the Direct3D reference device in IDirect3D1::FindDevice.
parent
d5c2a358
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
direct3d.c
dlls/ddraw/direct3d.c
+0
-1
d3d.c
dlls/ddraw/tests/d3d.c
+16
-9
No files found.
dlls/ddraw/direct3d.c
View file @
14744c44
...
...
@@ -684,7 +684,6 @@ IDirect3DImpl_3_FindDevice(IDirect3D3 *iface,
TRACE
(
" trying to match guid %s.
\n
"
,
debugstr_guid
(
&
(
D3DDFS
->
guid
)));
if
((
IsEqualGUID
(
&
IID_D3DDEVICE_WineD3D
,
&
(
D3DDFS
->
guid
))
==
0
)
&&
(
IsEqualGUID
(
&
IID_IDirect3DHALDevice
,
&
(
D3DDFS
->
guid
))
==
0
)
&&
(
IsEqualGUID
(
&
IID_IDirect3DRefDevice
,
&
(
D3DDFS
->
guid
))
==
0
)
&&
(
IsEqualGUID
(
&
IID_IDirect3DRGBDevice
,
&
(
D3DDFS
->
guid
))
==
0
))
{
TRACE
(
" no match for this GUID.
\n
"
);
...
...
dlls/ddraw/tests/d3d.c
View file @
14744c44
...
...
@@ -3403,6 +3403,11 @@ static void FindDevice(void)
{
&
IID_IDirect3DRGBDevice
},
};
static
const
GUID
*
nonexistent_deviceGUIDs
[]
=
{
&
IID_IDirect3DMMXDevice
,
&
IID_IDirect3DRefDevice
,
&
IID_IDirect3DTnLHalDevice
,
&
IID_IDirect3DNullDevice
};
D3DFINDDEVICESEARCH
search
=
{
0
};
D3DFINDDEVICERESULT
result
=
{
0
};
HRESULT
hr
;
...
...
@@ -3454,16 +3459,18 @@ static void FindDevice(void)
ok
(
hr
==
DDERR_NOTFOUND
,
"Expected IDirect3D1::FindDevice to return DDERR_NOTFOUND, got 0x%08x
\n
"
,
hr
);
/* The reference device GUID can't be enumerated. */
search
.
dwSize
=
sizeof
(
search
);
search
.
dwFlags
=
D3DFDS_GUID
;
search
.
guid
=
IID_IDirect3DRefDevice
;
result
.
dwSize
=
sizeof
(
result
);
/* These GUIDs appear to be never present. */
for
(
i
=
0
;
i
<
sizeof
(
nonexistent_deviceGUIDs
)
/
sizeof
(
nonexistent_deviceGUIDs
[
0
]);
i
++
)
{
search
.
dwSize
=
sizeof
(
search
);
search
.
dwFlags
=
D3DFDS_GUID
;
search
.
guid
=
*
nonexistent_deviceGUIDs
[
i
];
result
.
dwSize
=
sizeof
(
result
);
hr
=
IDirect3D_FindDevice
(
Direct3D1
,
&
search
,
&
result
);
todo_wine
ok
(
hr
==
DDERR_NOTFOUND
,
"Expected IDirect3D1::FindDevice to return DDERR_NOTFOUND, got 0x%08x
\n
"
,
hr
);
hr
=
IDirect3D_FindDevice
(
Direct3D1
,
&
search
,
&
result
);
ok
(
hr
==
DDERR_NOTFOUND
,
"[%d] Expected IDirect3D1::FindDevice to return DDERR_NOTFOUND, got 0x%08x
\n
"
,
i
,
hr
);
}
/* These GUIDs appear to be always present. */
for
(
i
=
0
;
i
<
sizeof
(
deviceGUIDs
)
/
sizeof
(
deviceGUIDs
[
0
]);
i
++
)
...
...
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