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
83b02573
Commit
83b02573
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: Convert calls to DirectDrawEnumerate into DirectDrawEnumerateEx.
parent
95a4f3dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
24 deletions
+28
-24
main.c
dlls/ddraw/main.c
+28
-24
No files found.
dlls/ddraw/main.c
View file @
83b02573
...
...
@@ -46,6 +46,22 @@ static HINSTANCE instance;
/* value of ForceRefreshRate */
DWORD
force_refresh_rate
=
0
;
/* Structure for converting DirectDrawEnumerateA to DirectDrawEnumerateExA */
struct
callback_info
{
LPDDENUMCALLBACKA
callback
;
void
*
context
;
};
/* Enumeration callback for converting DirectDrawEnumerateA to DirectDrawEnumerateExA */
static
HRESULT
CALLBACK
enum_callback
(
GUID
*
guid
,
char
*
description
,
char
*
driver_name
,
void
*
context
,
HMONITOR
monitor
)
{
const
struct
callback_info
*
info
=
context
;
return
info
->
callback
(
guid
,
description
,
driver_name
,
info
->
context
);
}
/* Handle table functions */
BOOL
ddraw_handle_table_init
(
struct
ddraw_handle_table
*
t
,
UINT
initial_size
)
{
...
...
@@ -336,27 +352,15 @@ DirectDrawCreateEx(GUID *guid,
*
*
***********************************************************************/
HRESULT
WINAPI
DirectDrawEnumerateA
(
LPDDENUMCALLBACKA
Callback
,
void
*
C
ontext
)
HRESULT
WINAPI
DirectDrawEnumerateA
(
LPDDENUMCALLBACKA
callback
,
void
*
c
ontext
)
{
TRACE
(
"callback %p, context %p.
\n
"
,
Callback
,
Context
);
TRACE
(
" Enumerating default DirectDraw HAL interface
\n
"
);
/* We only have one driver */
__TRY
{
static
CHAR
driver_desc
[]
=
"DirectDraw HAL"
,
driver_name
[]
=
"display"
;
struct
callback_info
info
;
Callback
(
NULL
,
driver_desc
,
driver_name
,
Context
);
}
__EXCEPT_PAGE_FAULT
{
return
DDERR_INVALIDPARAMS
;
}
__ENDTRY
TRACE
(
"callback %p, context %p.
\n
"
,
callback
,
context
);
TRACE
(
" End of enumeration
\n
"
);
return
DD_OK
;
info
.
callback
=
callback
;
info
.
context
=
context
;
return
DirectDrawEnumerateExA
(
enum_callback
,
&
info
,
0x0
);
}
/***********************************************************************
...
...
@@ -368,17 +372,17 @@ HRESULT WINAPI DirectDrawEnumerateA(LPDDENUMCALLBACKA Callback, void *Context)
* The Flag member is not supported right now.
*
***********************************************************************/
HRESULT
WINAPI
DirectDrawEnumerateExA
(
LPDDENUMCALLBACKEXA
Callback
,
void
*
Context
,
DWORD
F
lags
)
HRESULT
WINAPI
DirectDrawEnumerateExA
(
LPDDENUMCALLBACKEXA
callback
,
void
*
context
,
DWORD
f
lags
)
{
TRACE
(
"callback %p, context %p, flags %#x.
\n
"
,
Callback
,
Context
,
F
lags
);
TRACE
(
"callback %p, context %p, flags %#x.
\n
"
,
callback
,
context
,
f
lags
);
if
(
F
lags
&
~
(
DDENUM_ATTACHEDSECONDARYDEVICES
|
if
(
f
lags
&
~
(
DDENUM_ATTACHEDSECONDARYDEVICES
|
DDENUM_DETACHEDSECONDARYDEVICES
|
DDENUM_NONDISPLAYDEVICES
))
return
DDERR_INVALIDPARAMS
;
if
(
F
lags
)
FIXME
(
"flags 0x%08x not handled
\n
"
,
F
lags
);
if
(
f
lags
)
FIXME
(
"flags 0x%08x not handled
\n
"
,
f
lags
);
TRACE
(
"Enumerating default DirectDraw HAL interface
\n
"
);
...
...
@@ -389,7 +393,7 @@ HRESULT WINAPI DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA Callback, void *Contex
driver_name
[]
=
"display"
;
/* QuickTime expects the description "DirectDraw HAL" */
Callback
(
NULL
,
driver_desc
,
driver_name
,
C
ontext
,
0
);
callback
(
NULL
,
driver_desc
,
driver_name
,
c
ontext
,
0
);
}
__EXCEPT_PAGE_FAULT
{
...
...
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