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
eb922701
Commit
eb922701
authored
Jun 21, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
Jun 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Allow the ddraw RGB device to be enumerated in IDirect3D3::FindDevice.
Partially based on a patch by David Adam.
parent
10a076ad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
2 deletions
+67
-2
direct3d.c
dlls/ddraw/direct3d.c
+3
-2
d3d.c
dlls/ddraw/tests/d3d.c
+64
-0
No files found.
dlls/ddraw/direct3d.c
View file @
eb922701
...
...
@@ -684,10 +684,11 @@ 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_IDirect3DRefDevice
,
&
(
D3DDFS
->
guid
))
==
0
)
&&
(
IsEqualGUID
(
&
IID_IDirect3DRGBDevice
,
&
(
D3DDFS
->
guid
))
==
0
))
{
TRACE
(
" no match for this GUID.
\n
"
);
return
DDERR_
INVALIDPARAMS
;
return
DDERR_
NOTFOUND
;
}
}
...
...
dlls/ddraw/tests/d3d.c
View file @
eb922701
...
...
@@ -3393,9 +3393,20 @@ static void VertexBufferLockRest(void)
static
void
FindDevice
(
void
)
{
static
const
struct
{
const
GUID
*
guid
;
int
todo
;
}
deviceGUIDs
[]
=
{
{
&
IID_IDirect3DRampDevice
,
1
},
{
&
IID_IDirect3DRGBDevice
},
};
D3DFINDDEVICESEARCH
search
=
{
0
};
D3DFINDDEVICERESULT
result
=
{
0
};
HRESULT
hr
;
int
i
;
/* Test invalid parameters. */
hr
=
IDirect3D_FindDevice
(
Direct3D1
,
NULL
,
NULL
);
...
...
@@ -3423,6 +3434,59 @@ static void FindDevice(void)
hr
=
IDirect3D_FindDevice
(
Direct3D1
,
&
search
,
&
result
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"Expected IDirect3D1::FindDevice to return DDERR_INVALIDPARAMS, got 0x%08x
\n
"
,
hr
);
/* Specifying no flags is permitted. */
search
.
dwSize
=
sizeof
(
search
);
search
.
dwFlags
=
0
;
result
.
dwSize
=
sizeof
(
result
);
hr
=
IDirect3D_FindDevice
(
Direct3D1
,
&
search
,
&
result
);
ok
(
hr
==
D3D_OK
,
"Expected IDirect3D1::FindDevice to return D3D_OK, got 0x%08x
\n
"
,
hr
);
/* Try an arbitrary non-device GUID. */
search
.
dwSize
=
sizeof
(
search
);
search
.
dwFlags
=
D3DFDS_GUID
;
search
.
guid
=
IID_IDirect3D
;
result
.
dwSize
=
sizeof
(
result
);
hr
=
IDirect3D_FindDevice
(
Direct3D1
,
&
search
,
&
result
);
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
);
hr
=
IDirect3D_FindDevice
(
Direct3D1
,
&
search
,
&
result
);
todo_wine
ok
(
hr
==
DDERR_NOTFOUND
,
"Expected IDirect3D1::FindDevice to return DDERR_NOTFOUND, got 0x%08x
\n
"
,
hr
);
/* These GUIDs appear to be always present. */
for
(
i
=
0
;
i
<
sizeof
(
deviceGUIDs
)
/
sizeof
(
deviceGUIDs
[
0
]);
i
++
)
{
search
.
dwSize
=
sizeof
(
search
);
search
.
dwFlags
=
D3DFDS_GUID
;
search
.
guid
=
*
deviceGUIDs
[
i
].
guid
;
result
.
dwSize
=
sizeof
(
result
);
hr
=
IDirect3D_FindDevice
(
Direct3D1
,
&
search
,
&
result
);
if
(
deviceGUIDs
[
i
].
todo
)
{
todo_wine
ok
(
hr
==
D3D_OK
,
"[%d] Expected IDirect3D1::FindDevice to return D3D_OK, got 0x%08x
\n
"
,
i
,
hr
);
}
else
{
ok
(
hr
==
D3D_OK
,
"[%d] Expected IDirect3D1::FindDevice to return D3D_OK, got 0x%08x
\n
"
,
i
,
hr
);
}
}
}
START_TEST
(
d3d
)
...
...
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