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
76535cd9
Commit
76535cd9
authored
Mar 14, 1999
by
Patrik Stridvall
Committed by
Alexandre Julliard
Mar 14, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added functions DirectDrawEnumerateW and DirectDrawEnumerateExW.
parent
5d1d777e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
201 additions
and
53 deletions
+201
-53
ddraw.c
graphics/ddraw.c
+198
-50
ddraw.spec
relay32/ddraw.spec
+3
-3
No files found.
graphics/ddraw.c
View file @
76535cd9
...
...
@@ -16,6 +16,8 @@
#include "config.h"
#ifndef X_DISPLAY_MISSING
#include "ts_xlib.h"
#include "ts_xutil.h"
...
...
@@ -127,64 +129,152 @@ DDRAW_DGA_Available(void)
#endif
/* defined(HAVE_LIBXXF86DGA) */
}
HRESULT
WINAPI
DirectDrawEnumerateA
(
LPDDENUMCALLBACKA
ddenumproc
,
LPVOID
data
)
{
TRACE
(
ddraw
,
"(%p,%p)
\n
"
,
ddenumproc
,
data
);
/**********************************************************************/
typedef
struct
{
LPVOID
lpCallback
;
LPVOID
lpContext
;
}
DirectDrawEnumerateProcData
;
/***********************************************************************
* DirectDrawEnumerateExA (DDRAW.*)
*/
HRESULT
WINAPI
DirectDrawEnumerateExA
(
LPDDENUMCALLBACKEXA
lpCallback
,
LPVOID
lpContext
,
DWORD
dwFlags
)
{
TRACE
(
ddraw
,
"(%p,%p, %08lx)
\n
"
,
lpCallback
,
lpContext
,
dwFlags
);
if
(
DDRAW_DGA_Available
())
{
TRACE
(
ddraw
,
"Enumerating DGA interface
\n
"
);
if
(
!
ddenumproc
(
&
DGA_DirectDraw_GUID
,
"WINE with XFree86 DGA"
,
"display"
,
data
))
return
DD_OK
;
}
TRACE
(
ddraw
,
"Enumerating Xlib interface
\n
"
);
if
(
!
ddenumproc
(
&
XLIB_DirectDraw_GUID
,
"WINE with Xlib"
,
"display"
,
data
))
return
DD_OK
;
TRACE
(
ddraw
,
"Enumerating Default interface
\n
"
);
if
(
!
ddenumproc
(
NULL
,
"WINE (default)"
,
"display"
,
data
))
return
DD_OK
;
return
DD_OK
;
if
(
TRACE_ON
(
ddraw
))
{
DUMP
(
" Flags : "
);
if
(
dwFlags
&
DDENUM_ATTACHEDSECONDARYDEVICES
)
DUMP
(
"DDENUM_ATTACHEDSECONDARYDEVICES "
);
if
(
dwFlags
&
DDENUM_DETACHEDSECONDARYDEVICES
)
DUMP
(
"DDENUM_DETACHEDSECONDARYDEVICES "
);
if
(
dwFlags
&
DDENUM_NONDISPLAYDEVICES
)
DUMP
(
"DDENUM_NONDISPLAYDEVICES "
);
DUMP
(
"
\n
"
);
}
if
(
dwFlags
&
DDENUM_NONDISPLAYDEVICES
)
{
/* For the moment, Wine does not support any 3D only accelerators */
return
DD_OK
;
}
if
(
DDRAW_DGA_Available
())
{
TRACE
(
ddraw
,
"Enumerating DGA interface
\n
"
);
if
(
!
lpCallback
(
&
DGA_DirectDraw_GUID
,
"WINE with XFree86 DGA"
,
"display"
,
lpContext
,
NULL
))
return
DD_OK
;
}
TRACE
(
ddraw
,
"Enumerating Xlib interface
\n
"
);
if
(
!
lpCallback
(
&
XLIB_DirectDraw_GUID
,
"WINE with Xlib"
,
"display"
,
lpContext
,
NULL
))
return
DD_OK
;
TRACE
(
ddraw
,
"Enumerating Default interface
\n
"
);
if
(
!
lpCallback
(
NULL
,
"WINE (default)"
,
"display"
,
lpContext
,
NULL
))
return
DD_OK
;
return
DD_OK
;
}
HRESULT
WINAPI
DirectDrawEnumerateExA
(
LPDDENUMCALLBACKEXA
ddenumproc
,
LPVOID
data
,
DWORD
dwFlags
)
{
TRACE
(
ddraw
,
"(%p,%p, %08lx)
\n
"
,
ddenumproc
,
data
,
dwFlags
);
/***********************************************************************
* DirectDrawEnumerateExW (DDRAW.*)
*/
if
(
TRACE_ON
(
ddraw
))
{
DUMP
(
" Flags : "
);
if
(
dwFlags
&
DDENUM_ATTACHEDSECONDARYDEVICES
)
DUMP
(
"DDENUM_ATTACHEDSECONDARYDEVICES "
);
if
(
dwFlags
&
DDENUM_DETACHEDSECONDARYDEVICES
)
DUMP
(
"DDENUM_DETACHEDSECONDARYDEVICES "
)
;
if
(
dwFlags
&
DDENUM_NONDISPLAYDEVICES
)
DUMP
(
"DDENUM_NONDISPLAYDEVICES "
);
DUMP
(
"
\n
"
);
}
static
BOOL
DirectDrawEnumerateExProcW
(
GUID
*
lpGUID
,
LPSTR
lpDriverDescription
,
LPSTR
lpDriverName
,
LPVOID
lpContext
,
HMONITOR
hm
)
{
DirectDrawEnumerateProcData
*
pEPD
=
(
DirectDrawEnumerateProcData
*
)
lpContext
;
LPWSTR
lpDriverDescriptionW
=
HEAP_strdupAtoW
(
GetProcessHeap
(),
0
,
lpDriverDescription
);
LPWSTR
lpDriverNameW
=
HEAP_strdupAtoW
(
GetProcessHeap
(),
0
,
lpDriverName
);
if
(
dwFlags
&
DDENUM_NONDISPLAYDEVICES
)
{
/* For the moment, Wine does not support any 3D only accelerators */
return
DD_OK
;
}
if
(
DDRAW_DGA_Available
())
{
TRACE
(
ddraw
,
"Enumerating DGA interface
\n
"
);
if
(
!
ddenumproc
(
&
DGA_DirectDraw_GUID
,
"WINE with XFree86 DGA"
,
"display"
,
data
,
NULL
))
return
DD_OK
;
}
BOOL
bResult
=
(
*
(
LPDDENUMCALLBACKEXW
*
)
pEPD
->
lpCallback
)(
lpGUID
,
lpDriverDescriptionW
,
lpDriverNameW
,
pEPD
->
lpContext
,
hm
);
TRACE
(
ddraw
,
"Enumerating Xlib interface
\n
"
);
if
(
!
ddenumproc
(
&
XLIB_DirectDraw_GUID
,
"WINE with Xlib"
,
"display"
,
data
,
NULL
))
return
DD_OK
;
HeapFree
(
GetProcessHeap
(),
0
,
lpDriverDescriptionW
);
HeapFree
(
GetProcessHeap
(),
0
,
lpDriverNameW
);
TRACE
(
ddraw
,
"Enumerating Default interface
\n
"
);
if
(
!
ddenumproc
(
NULL
,
"WINE (default)"
,
"display"
,
data
,
NULL
))
return
DD_OK
;
return
DD_OK
;
return
bResult
;
}
/**********************************************************************/
HRESULT
WINAPI
DirectDrawEnumerateExW
(
LPDDENUMCALLBACKEXW
lpCallback
,
LPVOID
lpContext
,
DWORD
dwFlags
)
{
DirectDrawEnumerateProcData
epd
;
epd
.
lpCallback
=
lpCallback
;
epd
.
lpContext
=
lpContext
;
return
DirectDrawEnumerateExA
(
&
DirectDrawEnumerateExProcW
,
(
LPVOID
)
&
epd
,
0
);
}
/***********************************************************************
* DirectDrawEnumerateA (DDRAW.*)
*/
static
BOOL
DirectDrawEnumerateProcA
(
GUID
*
lpGUID
,
LPSTR
lpDriverDescription
,
LPSTR
lpDriverName
,
LPVOID
lpContext
,
HMONITOR
hm
)
{
DirectDrawEnumerateProcData
*
pEPD
=
(
DirectDrawEnumerateProcData
*
)
lpContext
;
return
(
*
(
LPDDENUMCALLBACKA
*
)
pEPD
->
lpCallback
)(
lpGUID
,
lpDriverDescription
,
lpDriverName
,
pEPD
->
lpContext
);
}
/**********************************************************************/
HRESULT
WINAPI
DirectDrawEnumerateA
(
LPDDENUMCALLBACKA
lpCallback
,
LPVOID
lpContext
)
{
DirectDrawEnumerateProcData
epd
;
epd
.
lpCallback
=
lpCallback
;
epd
.
lpContext
=
lpContext
;
return
DirectDrawEnumerateExA
(
&
DirectDrawEnumerateProcA
,
(
LPVOID
)
&
epd
,
0
);
}
/***********************************************************************
* DirectDrawEnumerateW (DDRAW.*)
*/
static
BOOL
DirectDrawEnumerateProcW
(
GUID
*
lpGUID
,
LPWSTR
lpDriverDescription
,
LPWSTR
lpDriverName
,
LPVOID
lpContext
,
HMONITOR
hm
)
{
DirectDrawEnumerateProcData
*
pEPD
=
(
DirectDrawEnumerateProcData
*
)
lpContext
;
return
(
*
(
LPDDENUMCALLBACKW
*
)
pEPD
->
lpCallback
)(
lpGUID
,
lpDriverDescription
,
lpDriverName
,
pEPD
->
lpContext
);
}
/**********************************************************************/
HRESULT
WINAPI
DirectDrawEnumerateW
(
LPDDENUMCALLBACKW
lpCallback
,
LPVOID
lpContext
)
{
DirectDrawEnumerateProcData
epd
;
epd
.
lpCallback
=
lpCallback
;
epd
.
lpContext
=
lpContext
;
return
DirectDrawEnumerateExW
(
&
DirectDrawEnumerateProcW
,
(
LPVOID
)
&
epd
,
0
);
}
/***********************************************************************
* DSoundHelp (DDRAW.?)
*/
/* What is this doing here? */
HRESULT
WINAPI
DSoundHelp
(
DWORD
x
,
DWORD
y
,
DWORD
z
)
{
...
...
@@ -192,7 +282,6 @@ DSoundHelp(DWORD x,DWORD y,DWORD z) {
return
0
;
}
/******************************************************************************
* internal helper functions
*/
...
...
@@ -4160,3 +4249,62 @@ HRESULT WINAPI DirectDrawCreate( LPGUID lpGUID, LPDIRECTDRAW *lplpDD, LPUNKNOWN
ERR
(
ddraw
,
"DirectDrawCreate(%s,%p,%p): did not recognize requested GUID
\n
"
,
xclsid
,
lplpDD
,
pUnkOuter
);
return
DDERR_INVALIDDIRECTDRAWGUID
;
}
#else
/* !defined(X_DISPLAY_MISSING) */
#include "wintypes.h"
#define DD_OK 0
typedef
void
*
LPGUID
;
typedef
void
*
LPUNKNOWN
;
typedef
void
*
LPDIRECTDRAW
;
typedef
void
*
LPDIRECTDRAWCLIPPER
;
typedef
void
*
LPDDENUMCALLBACKA
;
typedef
void
*
LPDDENUMCALLBACKEXA
;
typedef
void
*
LPDDENUMCALLBACKEXW
;
typedef
void
*
LPDDENUMCALLBACKW
;
HRESULT
WINAPI
DSoundHelp
(
DWORD
x
,
DWORD
y
,
DWORD
z
)
{
return
DD_OK
;
}
HRESULT
WINAPI
DirectDrawCreate
(
LPGUID
lpGUID
,
LPDIRECTDRAW
*
lplpDD
,
LPUNKNOWN
pUnkOuter
)
{
return
DD_OK
;
}
HRESULT
WINAPI
DirectDrawCreateClipper
(
DWORD
dwFlags
,
LPDIRECTDRAWCLIPPER
*
lplpDDClipper
,
LPUNKNOWN
pUnkOuter
)
{
return
DD_OK
;
}
HRESULT
WINAPI
DirectDrawEnumerateA
(
LPDDENUMCALLBACKA
lpCallback
,
LPVOID
lpContext
)
{
return
DD_OK
;
}
HRESULT
WINAPI
DirectDrawEnumerateExA
(
LPDDENUMCALLBACKEXA
lpCallback
,
LPVOID
lpContext
,
DWORD
dwFlags
)
{
return
DD_OK
;
}
HRESULT
WINAPI
DirectDrawEnumerateExW
(
LPDDENUMCALLBACKEXW
lpCallback
,
LPVOID
lpContext
,
DWORD
dwFlags
)
{
return
DD_OK
;
}
HRESULT
WINAPI
DirectDrawEnumerateW
(
LPDDENUMCALLBACKW
lpCallback
,
LPVOID
lpContext
)
{
return
DD_OK
;
}
#endif
/* !defined(X_DISPLAY_MISSING) */
relay32/ddraw.spec
View file @
76535cd9
...
...
@@ -9,9 +9,9 @@ type win32
6 stdcall DirectDrawCreate(ptr ptr ptr) DirectDrawCreate
7 stdcall DirectDrawCreateClipper(long ptr ptr) DirectDrawCreateClipper
8 stdcall DirectDrawEnumerateA(ptr ptr) DirectDrawEnumerateA
9 st
ub DirectDrawEnumerateW
10 stdcall DirectDrawEnumerateEx
A(ptr ptr long) DirectDrawEnumerateExA
11 st
ub DirectDrawEnumerateEx
W
9 st
dcall DirectDrawEnumerateExA(ptr ptr long) DirectDrawEnumerateExA
10 stdcall DirectDrawEnumerateEx
W(ptr ptr long) DirectDrawEnumerateExW
11 st
dcall DirectDrawEnumerateW(ptr ptr) DirectDrawEnumerate
W
12 stub DllCanUnloadNow
13 stub DllGetClassObject
14 stub GetNextMipMap
...
...
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