Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
b0cefe89
Commit
b0cefe89
authored
12 years ago
by
Erich Hoover
Committed by
Alexandre Julliard
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ddraw: Enumerate wined3d interfaces with DirectDrawEnumerateEx.
parent
83b02573
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/ddraw/main.c
+34
-5
34 additions, 5 deletions
dlls/ddraw/main.c
with
34 additions
and
5 deletions
dlls/ddraw/main.c
+
34
−
5
View file @
b0cefe89
...
...
@@ -374,6 +374,8 @@ HRESULT WINAPI DirectDrawEnumerateA(LPDDENUMCALLBACKA callback, void *context)
***********************************************************************/
HRESULT
WINAPI
DirectDrawEnumerateExA
(
LPDDENUMCALLBACKEXA
callback
,
void
*
context
,
DWORD
flags
)
{
struct
wined3d
*
wined3d
;
TRACE
(
"callback %p, context %p, flags %#x.
\n
"
,
callback
,
context
,
flags
);
if
(
flags
&
~
(
DDENUM_ATTACHEDSECONDARYDEVICES
|
...
...
@@ -384,23 +386,50 @@ HRESULT WINAPI DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA callback, void *contex
if
(
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
{
/* QuickTime expects the description "DirectDraw HAL" */
static
CHAR
driver_desc
[]
=
"DirectDraw HAL"
,
driver_name
[]
=
"display"
;
/* QuickTime expects the description "DirectDraw HAL" */
callback
(
NULL
,
driver_desc
,
driver_name
,
context
,
0
);
struct
wined3d_adapter_identifier
adapter_id
;
HRESULT
hr
=
S_OK
;
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
{
wined3d_decref
(
wined3d
);
return
DDERR_INVALIDPARAMS
;
}
__ENDTRY
;
wined3d_decref
(
wined3d
);
TRACE
(
"End of enumeration
\n
"
);
return
DD_OK
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment