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
aa109490
Commit
aa109490
authored
Oct 23, 2000
by
Marcus Meissner
Committed by
Alexandre Julliard
Oct 23, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some basic IDirectDraw7 interface support, fixed argument count
of IDirectDraw{4,7}_SetDisplayMode defines.
parent
e4ab07e0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
136 additions
and
8 deletions
+136
-8
dga.c
dlls/ddraw/ddraw/dga.c
+55
-3
main.c
dlls/ddraw/ddraw/main.c
+18
-0
x11.c
dlls/ddraw/ddraw/x11.c
+52
-2
ddraw_private.h
dlls/ddraw/ddraw_private.h
+7
-0
x11_private.h
dlls/ddraw/x11_private.h
+2
-1
ddraw.h
include/ddraw.h
+2
-2
No files found.
dlls/ddraw/ddraw/dga.c
View file @
aa109490
...
...
@@ -44,6 +44,7 @@ DEFAULT_DEBUG_CHANNEL(ddraw);
struct
ICOM_VTABLE
(
IDirectDraw
)
dga_ddvt
;
struct
ICOM_VTABLE
(
IDirectDraw2
)
dga_dd2vt
;
struct
ICOM_VTABLE
(
IDirectDraw4
)
dga_dd4vt
;
struct
ICOM_VTABLE
(
IDirectDraw7
)
dga_dd7vt
;
#define DDPRIVATE(x) dga_dd_private *ddpriv = ((dga_dd_private*)(x)->d->private)
#define DPPRIVATE(x) dga_dp_private *dppriv = ((dga_dp_private*)(x)->private)
...
...
@@ -412,14 +413,23 @@ HRESULT WINAPI DGA_IDirectDraw2Impl_QueryInterface(
return
S_OK
;
}
if
(
IsEqualGUID
(
&
IID_IDirectDraw4
,
refiid
)
)
{
IDirectDraw
2
Impl
*
dd
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
dd
));
ICOM_VTBL
(
dd
)
=
&
dga_dd
2
vt
;
dd
->
ref
=
1
;
dd
->
d
=
This
->
d
;
This
->
d
++
;
IDirectDraw
4
Impl
*
dd
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
dd
));
ICOM_VTBL
(
dd
)
=
&
dga_dd
4
vt
;
dd
->
ref
=
1
;
dd
->
d
=
This
->
d
;
This
->
d
++
;
*
obj
=
dd
;
IDirectDraw
2
_AddRef
(
iface
);
IDirectDraw
4
_AddRef
(
iface
);
TRACE
(
" Creating IDirectDraw4 interface (%p)
\n
"
,
*
obj
);
return
S_OK
;
}
if
(
IsEqualGUID
(
&
IID_IDirectDraw7
,
refiid
)
)
{
IDirectDraw4Impl
*
dd
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
dd
));
ICOM_VTBL
(
dd
)
=
&
dga_dd7vt
;
dd
->
ref
=
1
;
dd
->
d
=
This
->
d
;
This
->
d
++
;
*
obj
=
dd
;
IDirectDraw7_AddRef
(
iface
);
FIXME
(
" Creating IDirectDraw7 interface (by using DirectDraw4 impl.) (%p)
\n
"
,
*
obj
);
return
S_OK
;
}
FIXME
(
"(%p):interface for IID %s _NOT_ found!
\n
"
,
This
,
debugstr_guid
(
refiid
));
return
OLE_E_ENUM_NOMORE
;
}
...
...
@@ -660,3 +670,45 @@ ICOM_VTABLE(IDirectDraw4) dga_dd4vt =
IDirectDraw4Impl_GetDeviceIdentifier
};
#undef XCAST
#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
# define XCAST(fun) (typeof(dga_dd7vt.fn##fun))
#else
# define XCAST(fun) (void*)
#endif
ICOM_VTABLE
(
IDirectDraw7
)
dga_dd7vt
=
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
XCAST
(
QueryInterface
)
DGA_IDirectDraw2Impl_QueryInterface
,
XCAST
(
AddRef
)
IDirectDraw2Impl_AddRef
,
XCAST
(
Release
)
DGA_IDirectDraw2Impl_Release
,
XCAST
(
Compact
)
IDirectDraw2Impl_Compact
,
XCAST
(
CreateClipper
)
IDirectDraw2Impl_CreateClipper
,
XCAST
(
CreatePalette
)
DGA_IDirectDraw2Impl_CreatePalette
,
XCAST
(
CreateSurface
)
DGA_IDirectDraw2Impl_CreateSurface
,
XCAST
(
DuplicateSurface
)
IDirectDraw2Impl_DuplicateSurface
,
XCAST
(
EnumDisplayModes
)
DGA_IDirectDraw2Impl_EnumDisplayModes
,
XCAST
(
EnumSurfaces
)
IDirectDraw2Impl_EnumSurfaces
,
XCAST
(
FlipToGDISurface
)
IDirectDraw2Impl_FlipToGDISurface
,
XCAST
(
GetCaps
)
DGA_IDirectDraw2Impl_GetCaps
,
XCAST
(
GetDisplayMode
)
DGA_IDirectDraw2Impl_GetDisplayMode
,
XCAST
(
GetFourCCCodes
)
IDirectDraw2Impl_GetFourCCCodes
,
XCAST
(
GetGDISurface
)
IDirectDraw2Impl_GetGDISurface
,
XCAST
(
GetMonitorFrequency
)
IDirectDraw2Impl_GetMonitorFrequency
,
XCAST
(
GetScanLine
)
IDirectDraw2Impl_GetScanLine
,
XCAST
(
GetVerticalBlankStatus
)
IDirectDraw2Impl_GetVerticalBlankStatus
,
XCAST
(
Initialize
)
IDirectDraw2Impl_Initialize
,
XCAST
(
RestoreDisplayMode
)
DGA_IDirectDraw2Impl_RestoreDisplayMode
,
XCAST
(
SetCooperativeLevel
)
IDirectDraw2Impl_SetCooperativeLevel
,
XCAST
(
SetDisplayMode
)
DGA_IDirectDrawImpl_SetDisplayMode
,
XCAST
(
WaitForVerticalBlank
)
IDirectDraw2Impl_WaitForVerticalBlank
,
XCAST
(
GetAvailableVidMem
)
DGA_IDirectDraw2Impl_GetAvailableVidMem
,
XCAST
(
GetSurfaceFromDC
)
IDirectDraw4Impl_GetSurfaceFromDC
,
XCAST
(
RestoreAllSurfaces
)
IDirectDraw4Impl_RestoreAllSurfaces
,
XCAST
(
TestCooperativeLevel
)
IDirectDraw4Impl_TestCooperativeLevel
,
XCAST
(
GetDeviceIdentifier
)
IDirectDraw4Impl_GetDeviceIdentifier
,
IDirectDraw7Impl_StartModeTest
,
IDirectDraw7Impl_EvaluateMode
};
#undef XCAST
dlls/ddraw/ddraw/main.c
View file @
aa109490
...
...
@@ -528,6 +528,24 @@ HRESULT WINAPI IDirectDraw4Impl_GetDeviceIdentifier(
return
DD_OK
;
}
HRESULT
WINAPI
IDirectDraw7Impl_StartModeTest
(
LPDIRECTDRAW7
iface
,
LPSIZE
lpModesToTest
,
DWORD
dwNumEntries
,
DWORD
dwFlags
)
{
FIXME
(
"(%p)->(%p,%ld,0x%08lx),empty stub!
\n
"
,
iface
,
lpModesToTest
,
dwNumEntries
,
dwFlags
);
return
DD_OK
;
}
HRESULT
WINAPI
IDirectDraw7Impl_EvaluateMode
(
LPDIRECTDRAW7
iface
,
DWORD
dwFlags
,
DWORD
*
pSecondsUntilTimeout
)
{
FIXME
(
"(%p)->(0x%08lx,%p),empty stub!
\n
"
,
iface
,
dwFlags
,
pSecondsUntilTimeout
);
return
DD_OK
;
}
HRESULT
common_off_screen_CreateSurface
(
IDirectDraw2Impl
*
This
,
IDirectDrawSurfaceImpl
*
lpdsf
)
{
...
...
dlls/ddraw/ddraw/x11.c
View file @
aa109490
...
...
@@ -906,10 +906,19 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_QueryInterface(
dd
->
ref
=
1
;
ICOM_VTBL
(
dd
)
=
&
xlib_dd4vt
;
dd
->
d
=
This
->
d
;
This
->
d
->
ref
++
;
*
obj
=
dd
;
IDirectDraw
2
_AddRef
(
iface
);
IDirectDraw
4
_AddRef
(
iface
);
TRACE
(
" Creating IDirectDraw4 interface (%p)
\n
"
,
*
obj
);
return
S_OK
;
}
if
(
IsEqualGUID
(
&
IID_IDirectDraw7
,
refiid
)
)
{
IDirectDraw4Impl
*
dd
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
dd
));
dd
->
ref
=
1
;
ICOM_VTBL
(
dd
)
=
&
xlib_dd7vt
;
dd
->
d
=
This
->
d
;
This
->
d
->
ref
++
;
*
obj
=
dd
;
IDirectDraw7_AddRef
(
iface
);
FIXME
(
" Creating IDirectDraw7 interface by reusing DirectDraw4!(%p)
\n
"
,
*
obj
);
return
S_OK
;
}
#ifdef HAVE_OPENGL
if
(
IsEqualGUID
(
&
IID_IDirect3D
,
refiid
)
)
return
create_direct3d
(
obj
,
This
);
...
...
@@ -1266,7 +1275,7 @@ ICOM_VTABLE(IDirectDraw4) xlib_dd4vt = {
XCAST
(
Initialize
)
IDirectDraw2Impl_Initialize
,
XCAST
(
RestoreDisplayMode
)
IDirectDraw2Impl_RestoreDisplayMode
,
XCAST
(
SetCooperativeLevel
)
Xlib_IDirectDraw2Impl_SetCooperativeLevel
,
XCAST
(
SetDisplayMode
)
Xlib_IDirectDrawImpl_SetDisplayMode
,
XCAST
(
SetDisplayMode
)
Xlib_IDirectDraw
2
Impl_SetDisplayMode
,
XCAST
(
WaitForVerticalBlank
)
IDirectDraw2Impl_WaitForVerticalBlank
,
XCAST
(
GetAvailableVidMem
)
Xlib_IDirectDraw2Impl_GetAvailableVidMem
,
IDirectDraw4Impl_GetSurfaceFromDC
,
...
...
@@ -1275,3 +1284,44 @@ ICOM_VTABLE(IDirectDraw4) xlib_dd4vt = {
IDirectDraw4Impl_GetDeviceIdentifier
};
#undef XCAST
#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
# define XCAST(fun) (typeof(xlib_dd7vt.fn##fun))
#else
# define XCAST(fun) (void*)
#endif
ICOM_VTABLE
(
IDirectDraw7
)
xlib_dd7vt
=
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
XCAST
(
QueryInterface
)
Xlib_IDirectDraw2Impl_QueryInterface
,
XCAST
(
AddRef
)
IDirectDraw2Impl_AddRef
,
XCAST
(
Release
)
Xlib_IDirectDraw2Impl_Release
,
XCAST
(
Compact
)
IDirectDraw2Impl_Compact
,
XCAST
(
CreateClipper
)
IDirectDraw2Impl_CreateClipper
,
XCAST
(
CreatePalette
)
Xlib_IDirectDraw2Impl_CreatePalette
,
XCAST
(
CreateSurface
)
Xlib_IDirectDraw2Impl_CreateSurface
,
XCAST
(
DuplicateSurface
)
IDirectDraw2Impl_DuplicateSurface
,
XCAST
(
EnumDisplayModes
)
Xlib_IDirectDraw2Impl_EnumDisplayModes
,
XCAST
(
EnumSurfaces
)
IDirectDraw2Impl_EnumSurfaces
,
XCAST
(
FlipToGDISurface
)
IDirectDraw2Impl_FlipToGDISurface
,
XCAST
(
GetCaps
)
Xlib_IDirectDraw2Impl_GetCaps
,
XCAST
(
GetDisplayMode
)
IDirectDraw2Impl_GetDisplayMode
,
XCAST
(
GetFourCCCodes
)
Xlib_IDirectDraw2Impl_GetFourCCCodes
,
XCAST
(
GetGDISurface
)
IDirectDraw2Impl_GetGDISurface
,
XCAST
(
GetMonitorFrequency
)
IDirectDraw2Impl_GetMonitorFrequency
,
XCAST
(
GetScanLine
)
IDirectDraw2Impl_GetScanLine
,
XCAST
(
GetVerticalBlankStatus
)
IDirectDraw2Impl_GetVerticalBlankStatus
,
XCAST
(
Initialize
)
IDirectDraw2Impl_Initialize
,
XCAST
(
RestoreDisplayMode
)
IDirectDraw2Impl_RestoreDisplayMode
,
XCAST
(
SetCooperativeLevel
)
Xlib_IDirectDraw2Impl_SetCooperativeLevel
,
XCAST
(
SetDisplayMode
)
Xlib_IDirectDraw2Impl_SetDisplayMode
,
XCAST
(
WaitForVerticalBlank
)
IDirectDraw2Impl_WaitForVerticalBlank
,
XCAST
(
GetAvailableVidMem
)
Xlib_IDirectDraw2Impl_GetAvailableVidMem
,
XCAST
(
GetSurfaceFromDC
)
IDirectDraw4Impl_GetSurfaceFromDC
,
XCAST
(
RestoreAllSurfaces
)
IDirectDraw4Impl_RestoreAllSurfaces
,
XCAST
(
TestCooperativeLevel
)
IDirectDraw4Impl_TestCooperativeLevel
,
XCAST
(
GetDeviceIdentifier
)
IDirectDraw4Impl_GetDeviceIdentifier
,
IDirectDraw7Impl_StartModeTest
,
IDirectDraw7Impl_EvaluateMode
,
};
#undef XCAST
dlls/ddraw/ddraw_private.h
View file @
aa109490
...
...
@@ -189,6 +189,13 @@ extern HRESULT WINAPI IDirectDraw4Impl_GetDeviceIdentifier(LPDIRECTDRAW4 iface,
DWORD
dwFlags
);
extern
HRESULT
WINAPI
IDirectDraw7Impl_StartModeTest
(
LPDIRECTDRAW7
iface
,
LPSIZE
modetotest
,
DWORD
num
,
DWORD
flags
);
extern
HRESULT
WINAPI
IDirectDraw7Impl_EvaluateMode
(
LPDIRECTDRAW7
iface
,
DWORD
flags
,
DWORD
*
seconduntiltimeout
);
/*****************************************************************************
* IDirectDrawPalette implementation structure
*/
...
...
dlls/ddraw/x11_private.h
View file @
aa109490
...
...
@@ -40,8 +40,9 @@ typedef int XvImage;
#include "wine_gl.h"
extern
ICOM_VTABLE
(
IDirectDraw
)
xlib_ddvt
;
extern
ICOM_VTABLE
(
IDirectDraw2
)
xlib_dd2vt
;
extern
ICOM_VTABLE
(
IDirectDraw2
)
xlib_dd2vt
;
extern
ICOM_VTABLE
(
IDirectDraw4
)
xlib_dd4vt
;
extern
ICOM_VTABLE
(
IDirectDraw7
)
xlib_dd7vt
;
extern
ICOM_VTABLE
(
IDirectDrawPalette
)
xlib_ddpalvt
;
extern
ICOM_VTABLE
(
IDirectDrawSurface4
)
xlib_dds4vt
;
...
...
include/ddraw.h
View file @
aa109490
...
...
@@ -1373,7 +1373,7 @@ ICOM_DEFINE(IDirectDraw4,IDirectDraw2)
#define IDirectDraw4_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
#define IDirectDraw4_RestoreDisplayMode(p) ICOM_CALL (RestoreDisplayMode,p)
#define IDirectDraw4_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
#define IDirectDraw4_SetDisplayMode(p,a,b,c
) ICOM_CALL3(SetDisplayMode,p,a,b,c
)
#define IDirectDraw4_SetDisplayMode(p,a,b,c
,d,e) ICOM_CALL5(SetDisplayMode,p,a,b,c,d,e
)
#define IDirectDraw4_WaitForVerticalBlank(p,a,b) ICOM_CALL2(WaitForVerticalBlank,p,a,b)
/*** IDirectDraw2 methods ***/
#define IDirectDraw4_GetAvailableVidMem(p,a,b,c) ICOM_CALL3(GetAvailableVidMem,p,a,b,c)
...
...
@@ -1451,7 +1451,7 @@ ICOM_DEFINE(IDirectDraw7,IUnknown)
#define IDirectDraw7_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
#define IDirectDraw7_RestoreDisplayMode(p) ICOM_CALL (RestoreDisplayMode,p)
#define IDirectDraw7_SetCooperativeLevel(p,a,b) ICOM_CALL2(SetCooperativeLevel,p,a,b)
#define IDirectDraw7_SetDisplayMode(p,a,b,c
) ICOM_CALL3(SetDisplayMode,p,a,b,c
)
#define IDirectDraw7_SetDisplayMode(p,a,b,c
,d,e) ICOM_CALL5(SetDisplayMode,p,a,b,c,d,e
)
#define IDirectDraw7_WaitForVerticalBlank(p,a,b) ICOM_CALL2(WaitForVerticalBlank,p,a,b)
/*** added in IDirectDraw2 ***/
#define IDirectDraw7_GetAvailableVidMem(p,a,b,c) ICOM_CALL3(GetAvailableVidMem,p,a,b,c)
...
...
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