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
b0cefe89
Commit
b0cefe89
authored
Sep 17, 2012
by
Erich Hoover
Committed by
Alexandre Julliard
Sep 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Enumerate wined3d interfaces with DirectDrawEnumerateEx.
parent
83b02573
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
5 deletions
+34
-5
main.c
dlls/ddraw/main.c
+34
-5
No files found.
dlls/ddraw/main.c
View file @
b0cefe89
...
@@ -374,6 +374,8 @@ HRESULT WINAPI DirectDrawEnumerateA(LPDDENUMCALLBACKA callback, void *context)
...
@@ -374,6 +374,8 @@ HRESULT WINAPI DirectDrawEnumerateA(LPDDENUMCALLBACKA callback, void *context)
***********************************************************************/
***********************************************************************/
HRESULT
WINAPI
DirectDrawEnumerateExA
(
LPDDENUMCALLBACKEXA
callback
,
void
*
context
,
DWORD
flags
)
HRESULT
WINAPI
DirectDrawEnumerateExA
(
LPDDENUMCALLBACKEXA
callback
,
void
*
context
,
DWORD
flags
)
{
{
struct
wined3d
*
wined3d
;
TRACE
(
"callback %p, context %p, flags %#x.
\n
"
,
callback
,
context
,
flags
);
TRACE
(
"callback %p, context %p, flags %#x.
\n
"
,
callback
,
context
,
flags
);
if
(
flags
&
~
(
DDENUM_ATTACHEDSECONDARYDEVICES
|
if
(
flags
&
~
(
DDENUM_ATTACHEDSECONDARYDEVICES
|
...
@@ -384,23 +386,50 @@ HRESULT WINAPI DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA callback, void *contex
...
@@ -384,23 +386,50 @@ HRESULT WINAPI DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA callback, void *contex
if
(
flags
)
if
(
flags
)
FIXME
(
"flags 0x%08x not handled
\n
"
,
flags
);
FIXME
(
"flags 0x%08x not handled
\n
"
,
flags
);
TRACE
(
"Enumerating default DirectDraw HAL interface
\n
"
);
TRACE
(
"Enumerating ddraw interfaces
\n
"
);
wined3d
=
wined3d_create
(
7
,
WINED3D_LEGACY_DEPTH_BIAS
);
/* We only have one driver by now */
__TRY
__TRY
{
{
/* QuickTime expects the description "DirectDraw HAL" */
static
CHAR
driver_desc
[]
=
"DirectDraw HAL"
,
static
CHAR
driver_desc
[]
=
"DirectDraw HAL"
,
driver_name
[]
=
"display"
;
driver_name
[]
=
"display"
;
struct
wined3d_adapter_identifier
adapter_id
;
/* QuickTime expects the description "DirectDraw HAL" */
HRESULT
hr
=
S_OK
;
callback
(
NULL
,
driver_desc
,
driver_name
,
context
,
0
);
UINT
adapter
=
0
;
BOOL
cont_enum
;
/* The Battle.net System Checker expects both a NULL device and a GUID-based device */
TRACE
(
"Default interface: DirectDraw HAL
\n
"
);
cont_enum
=
callback
(
NULL
,
driver_desc
,
driver_name
,
context
,
0
);
for
(
adapter
=
0
;
SUCCEEDED
(
hr
)
&&
cont_enum
;
adapter
++
)
{
char
DriverName
[
512
]
=
""
;
/* The Battle.net System Checker expects the GetAdapterIdentifier DeviceName to match the
* Driver Name, so obtain the DeviceName and GUID from D3D. */
memset
(
&
adapter_id
,
0x0
,
sizeof
(
adapter_id
));
adapter_id
.
device_name
=
DriverName
;
adapter_id
.
device_name_size
=
sizeof
(
DriverName
);
wined3d_mutex_lock
();
hr
=
wined3d_get_adapter_identifier
(
wined3d
,
adapter
,
0x0
,
&
adapter_id
);
wined3d_mutex_unlock
();
if
(
SUCCEEDED
(
hr
))
{
TRACE
(
"Interface %d: %s
\n
"
,
adapter
,
wine_dbgstr_guid
(
&
adapter_id
.
device_identifier
));
cont_enum
=
callback
(
&
adapter_id
.
device_identifier
,
driver_desc
,
adapter_id
.
device_name
,
context
,
0
);
}
}
}
}
__EXCEPT_PAGE_FAULT
__EXCEPT_PAGE_FAULT
{
{
wined3d_decref
(
wined3d
);
return
DDERR_INVALIDPARAMS
;
return
DDERR_INVALIDPARAMS
;
}
}
__ENDTRY
;
__ENDTRY
;
wined3d_decref
(
wined3d
);
TRACE
(
"End of enumeration
\n
"
);
TRACE
(
"End of enumeration
\n
"
);
return
DD_OK
;
return
DD_OK
;
}
}
...
...
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