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
8b1c1edb
Commit
8b1c1edb
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/tests: Test IDirect3D::FindDevice HAL enumeration.
parent
14744c44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
d3d.c
dlls/ddraw/tests/d3d.c
+29
-0
No files found.
dlls/ddraw/tests/d3d.c
View file @
8b1c1edb
...
@@ -3410,6 +3410,7 @@ static void FindDevice(void)
...
@@ -3410,6 +3410,7 @@ static void FindDevice(void)
D3DFINDDEVICESEARCH
search
=
{
0
};
D3DFINDDEVICESEARCH
search
=
{
0
};
D3DFINDDEVICERESULT
result
=
{
0
};
D3DFINDDEVICERESULT
result
=
{
0
};
IDirect3DDevice
*
d3dhal
;
HRESULT
hr
;
HRESULT
hr
;
int
i
;
int
i
;
...
@@ -3472,6 +3473,34 @@ static void FindDevice(void)
...
@@ -3472,6 +3473,34 @@ static void FindDevice(void)
"[%d] Expected IDirect3D1::FindDevice to return DDERR_NOTFOUND, got 0x%08x
\n
"
,
i
,
hr
);
"[%d] Expected IDirect3D1::FindDevice to return DDERR_NOTFOUND, got 0x%08x
\n
"
,
i
,
hr
);
}
}
/* The HAL device can only be enumerated if hardware acceleration is present. */
search
.
dwSize
=
sizeof
(
search
);
search
.
dwFlags
=
D3DFDS_GUID
;
search
.
guid
=
IID_IDirect3DHALDevice
;
result
.
dwSize
=
sizeof
(
result
);
hr
=
IDirect3D_FindDevice
(
Direct3D1
,
&
search
,
&
result
);
trace
(
"IDirect3D::FindDevice returned 0x%08x for the HAL device GUID
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IDirectDrawSurface_QueryInterface
(
Surface1
,
&
IID_IDirect3DHALDevice
,
(
void
**
)
&
d3dhal
);
/* Currently Wine only supports the creation of one Direct3D device
* for a given DirectDraw instance. */
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Expected IDirectDrawSurface::QueryInterface to succeed, got 0x%08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IDirect3DDevice_Release
(
d3dhal
);
}
else
{
hr
=
IDirectDrawSurface_QueryInterface
(
Surface1
,
&
IID_IDirect3DHALDevice
,
(
void
**
)
&
d3dhal
);
ok
(
FAILED
(
hr
),
"Expected IDirectDrawSurface::QueryInterface to fail, got 0x%08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IDirect3DDevice_Release
(
d3dhal
);
}
/* These GUIDs appear to be always present. */
/* These GUIDs appear to be always present. */
for
(
i
=
0
;
i
<
sizeof
(
deviceGUIDs
)
/
sizeof
(
deviceGUIDs
[
0
]);
i
++
)
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