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
99daff8f
Commit
99daff8f
authored
Nov 07, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 08, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Avoid LPDIRECTDRAW.
parent
2480c939
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
23 deletions
+19
-23
main.c
dlls/ddraw/main.c
+6
-10
ddrawmodes.c
dlls/ddraw/tests/ddrawmodes.c
+1
-1
dsurface.c
dlls/ddraw/tests/dsurface.c
+1
-1
amvideo.idl
include/amvideo.idl
+3
-3
ddraw.h
include/ddraw.h
+8
-8
No files found.
dlls/ddraw/main.c
View file @
99daff8f
...
...
@@ -270,25 +270,21 @@ DDRAW_Create(const GUID *guid,
* Arguments, return values: See DDRAW_Create
*
***********************************************************************/
HRESULT
WINAPI
DECLSPEC_HOTPATCH
DirectDrawCreate
(
GUID
*
GUID
,
LPDIRECTDRAW
*
DD
,
IUnknown
*
UnkOuter
)
HRESULT
WINAPI
DECLSPEC_HOTPATCH
DirectDrawCreate
(
GUID
*
driver_guid
,
IDirectDraw
**
ddraw
,
IUnknown
*
outer
)
{
HRESULT
hr
;
TRACE
(
"driver_guid %s, ddraw %p, outer
_unknown
%p.
\n
"
,
debugstr_guid
(
GUID
),
DD
,
UnkO
uter
);
TRACE
(
"driver_guid %s, ddraw %p, outer %p.
\n
"
,
debugstr_guid
(
driver_guid
),
ddraw
,
o
uter
);
wined3d_mutex_lock
();
hr
=
DDRAW_Create
(
GUID
,
(
void
**
)
DD
,
UnkO
uter
,
&
IID_IDirectDraw
);
hr
=
DDRAW_Create
(
driver_guid
,
(
void
**
)
ddraw
,
o
uter
,
&
IID_IDirectDraw
);
wined3d_mutex_unlock
();
if
(
SUCCEEDED
(
hr
))
{
hr
=
IDirectDraw_Initialize
(
*
DD
,
GUID
);
if
(
FAILED
(
hr
))
IDirectDraw_Release
(
*
DD
);
if
(
FAILED
(
hr
=
IDirectDraw_Initialize
(
*
ddraw
,
driver_guid
)))
IDirectDraw_Release
(
*
ddraw
);
}
return
hr
;
...
...
dlls/ddraw/tests/ddrawmodes.c
View file @
99daff8f
...
...
@@ -29,9 +29,9 @@
#include "wine/test.h"
#include "ddraw.h"
static
LPDIRECTDRAW
lpDD
=
NULL
;
static
IDirectDrawSurface
*
lpDDSPrimary
;
static
IDirectDrawSurface
*
lpDDSBack
;
static
IDirectDraw
*
lpDD
;
static
WNDCLASS
wc
;
static
HWND
hwnd
,
hwnd2
;
static
int
modes_cnt
;
...
...
dlls/ddraw/tests/dsurface.c
View file @
99daff8f
...
...
@@ -31,7 +31,7 @@
static
HRESULT
(
WINAPI
*
pDirectDrawCreateEx
)(
GUID
*
,
void
**
,
REFIID
,
IUnknown
*
);
static
LPDIRECTDRAW
lpDD
=
NULL
;
static
IDirectDraw
*
lpDD
;
static
DDCAPS
ddcaps
;
static
BOOL
CreateDirectDraw
(
void
)
...
...
include/amvideo.idl
View file @
99daff8f
...
...
@@ -21,7 +21,7 @@ import "objidl.idl";
/*
trick
widl
into
thinking
that
it
knows
the
DirectDraw
types
*
as
there
is
no
IDL
file
for
them
(
yet
)
*/
cpp_quote
(
"#if 0"
)
typedef
void
*
LPDIRECTDRAW
;
typedef
void
IDirectDraw
;
typedef
void
DDSURFACEDESC
,
DDCAPS
;
typedef
DWORD
RGBQUAD
;
typedef
LONGLONG
REFERENCE_TIME
;
...
...
@@ -73,8 +73,8 @@ interface IDirectDrawVideo : IUnknown
HRESULT
GetEmulatedCaps
(
[
out
]
DDCAPS
*
pCaps
)
;
HRESULT
GetSurfaceDesc
(
[
out
]
DDSURFACEDESC
*
pSurfaceDesc
)
;
HRESULT
GetFourCCCodes
(
[
out
]
DWORD
*
pCount
,
[
out
]
DWORD
*
pCodes
)
;
HRESULT
SetDirectDraw
(
[
in
]
LPDIRECTDRAW
pDirectD
raw
)
;
HRESULT
GetDirectDraw
(
[
out
]
LPDIRECTDRAW
*
ppDirectD
raw
)
;
HRESULT
SetDirectDraw
(
[
in
]
IDirectDraw
*
dd
raw
)
;
HRESULT
GetDirectDraw
(
[
out
]
IDirectDraw
**
dd
raw
)
;
HRESULT
GetSurfaceType
(
[
out
]
DWORD
*
pSurfaceType
)
;
HRESULT
SetDefault
()
;
HRESULT
UseScanLine
(
[
in
]
long
UseScanLine
)
;
...
...
include/ddraw.h
View file @
99daff8f
...
...
@@ -1235,7 +1235,7 @@ DECLARE_INTERFACE_(IDirectDrawPalette,IUnknown)
/*** IDirectDrawPalette methods ***/
STDMETHOD
(
GetCaps
)(
THIS_
LPDWORD
lpdwCaps
)
PURE
;
STDMETHOD
(
GetEntries
)(
THIS_
DWORD
dwFlags
,
DWORD
dwBase
,
DWORD
dwNumEntries
,
LPPALETTEENTRY
lpEntries
)
PURE
;
STDMETHOD
(
Initialize
)(
THIS_
LPDIRECTDRAW
lpDD
,
DWORD
dwFlags
,
LPPALETTEENTRY
lpDDColorT
able
)
PURE
;
STDMETHOD
(
Initialize
)(
THIS_
struct
IDirectDraw
*
ddraw
,
DWORD
flags
,
PALETTEENTRY
*
color_t
able
)
PURE
;
STDMETHOD
(
SetEntries
)(
THIS_
DWORD
dwFlags
,
DWORD
dwStartingEntry
,
DWORD
dwCount
,
LPPALETTEENTRY
lpEntries
)
PURE
;
};
#undef INTERFACE
...
...
@@ -1276,7 +1276,7 @@ DECLARE_INTERFACE_(IDirectDrawClipper,IUnknown)
/*** IDirectDrawClipper methods ***/
STDMETHOD
(
GetClipList
)(
THIS_
LPRECT
lpRect
,
LPRGNDATA
lpClipList
,
LPDWORD
lpdwSize
)
PURE
;
STDMETHOD
(
GetHWnd
)(
THIS_
HWND
*
lphWnd
)
PURE
;
STDMETHOD
(
Initialize
)(
THIS_
LPDIRECTDRAW
lpDD
,
DWORD
dwF
lags
)
PURE
;
STDMETHOD
(
Initialize
)(
THIS_
struct
IDirectDraw
*
ddraw
,
DWORD
f
lags
)
PURE
;
STDMETHOD
(
IsClipListChanged
)(
THIS_
BOOL
*
lpbChanged
)
PURE
;
STDMETHOD
(
SetClipList
)(
THIS_
LPRGNDATA
lpClipList
,
DWORD
dwFlags
)
PURE
;
STDMETHOD
(
SetHWnd
)(
THIS_
DWORD
dwFlags
,
HWND
hWnd
)
PURE
;
...
...
@@ -1893,7 +1893,7 @@ DECLARE_INTERFACE_(IDirectDrawSurface,IUnknown)
/*50*/
STDMETHOD
(
GetPalette
)(
THIS_
IDirectDrawPalette
**
palette
)
PURE
;
/*54*/
STDMETHOD
(
GetPixelFormat
)(
THIS_
LPDDPIXELFORMAT
lpDDPixelFormat
)
PURE
;
/*58*/
STDMETHOD
(
GetSurfaceDesc
)(
THIS_
LPDDSURFACEDESC
lpDDSurfaceDesc
)
PURE
;
/*5c*/
STDMETHOD
(
Initialize
)(
THIS_
LPDIRECTDRAW
lpDD
,
LPDDSURFACEDESC
lpDDSurfaceD
esc
)
PURE
;
/*5c*/
STDMETHOD
(
Initialize
)(
THIS_
IDirectDraw
*
ddraw
,
DDSURFACEDESC
*
surface_d
esc
)
PURE
;
/*60*/
STDMETHOD
(
IsLost
)(
THIS
)
PURE
;
/*64*/
STDMETHOD
(
Lock
)(
THIS_
LPRECT
lpDestRect
,
LPDDSURFACEDESC
lpDDSurfaceDesc
,
DWORD
dwFlags
,
HANDLE
hEvent
)
PURE
;
/*68*/
STDMETHOD
(
ReleaseDC
)(
THIS_
HDC
hDC
)
PURE
;
...
...
@@ -2027,7 +2027,7 @@ DECLARE_INTERFACE_(IDirectDrawSurface2,IUnknown)
STDMETHOD
(
GetPalette
)(
THIS_
IDirectDrawPalette
**
palette
)
PURE
;
STDMETHOD
(
GetPixelFormat
)(
THIS_
LPDDPIXELFORMAT
lpDDPixelFormat
)
PURE
;
STDMETHOD
(
GetSurfaceDesc
)(
THIS_
LPDDSURFACEDESC
lpDDSurfaceDesc
)
PURE
;
STDMETHOD
(
Initialize
)(
THIS_
LPDIRECTDRAW
lpDD
,
LPDDSURFACEDESC
lpDDSurfaceD
esc
)
PURE
;
STDMETHOD
(
Initialize
)(
THIS_
IDirectDraw
*
ddraw
,
DDSURFACEDESC
*
surface_d
esc
)
PURE
;
STDMETHOD
(
IsLost
)(
THIS
)
PURE
;
STDMETHOD
(
Lock
)(
THIS_
LPRECT
lpDestRect
,
LPDDSURFACEDESC
lpDDSurfaceDesc
,
DWORD
dwFlags
,
HANDLE
hEvent
)
PURE
;
STDMETHOD
(
ReleaseDC
)(
THIS_
HDC
hDC
)
PURE
;
...
...
@@ -2173,7 +2173,7 @@ DECLARE_INTERFACE_(IDirectDrawSurface3,IUnknown)
STDMETHOD
(
GetPalette
)(
THIS_
IDirectDrawPalette
**
palette
)
PURE
;
STDMETHOD
(
GetPixelFormat
)(
THIS_
LPDDPIXELFORMAT
lpDDPixelFormat
)
PURE
;
STDMETHOD
(
GetSurfaceDesc
)(
THIS_
LPDDSURFACEDESC
lpDDSurfaceDesc
)
PURE
;
STDMETHOD
(
Initialize
)(
THIS_
LPDIRECTDRAW
lpDD
,
LPDDSURFACEDESC
lpDDSurfaceD
esc
)
PURE
;
STDMETHOD
(
Initialize
)(
THIS_
IDirectDraw
*
ddraw
,
DDSURFACEDESC
*
surface_d
esc
)
PURE
;
STDMETHOD
(
IsLost
)(
THIS
)
PURE
;
STDMETHOD
(
Lock
)(
THIS_
LPRECT
lpDestRect
,
LPDDSURFACEDESC
lpDDSurfaceDesc
,
DWORD
dwFlags
,
HANDLE
hEvent
)
PURE
;
STDMETHOD
(
ReleaseDC
)(
THIS_
HDC
hDC
)
PURE
;
...
...
@@ -2324,7 +2324,7 @@ DECLARE_INTERFACE_(IDirectDrawSurface4,IUnknown)
STDMETHOD
(
GetPalette
)(
THIS_
IDirectDrawPalette
**
palette
)
PURE
;
STDMETHOD
(
GetPixelFormat
)(
THIS_
LPDDPIXELFORMAT
lpDDPixelFormat
)
PURE
;
STDMETHOD
(
GetSurfaceDesc
)(
THIS_
LPDDSURFACEDESC2
lpDDSurfaceDesc
)
PURE
;
STDMETHOD
(
Initialize
)(
THIS_
LPDIRECTDRAW
lpDD
,
LPDDSURFACEDESC2
lpDDSurfaceD
esc
)
PURE
;
STDMETHOD
(
Initialize
)(
THIS_
IDirectDraw
*
ddraw
,
DDSURFACEDESC2
*
surface_d
esc
)
PURE
;
STDMETHOD
(
IsLost
)(
THIS
)
PURE
;
STDMETHOD
(
Lock
)(
THIS_
LPRECT
lpDestRect
,
LPDDSURFACEDESC2
lpDDSurfaceDesc
,
DWORD
dwFlags
,
HANDLE
hEvent
)
PURE
;
STDMETHOD
(
ReleaseDC
)(
THIS_
HDC
hDC
)
PURE
;
...
...
@@ -2491,7 +2491,7 @@ DECLARE_INTERFACE_(IDirectDrawSurface7,IUnknown)
STDMETHOD
(
GetPalette
)(
THIS_
IDirectDrawPalette
**
palette
)
PURE
;
STDMETHOD
(
GetPixelFormat
)(
THIS_
LPDDPIXELFORMAT
lpDDPixelFormat
)
PURE
;
STDMETHOD
(
GetSurfaceDesc
)(
THIS_
LPDDSURFACEDESC2
lpDDSurfaceDesc
)
PURE
;
STDMETHOD
(
Initialize
)(
THIS_
LPDIRECTDRAW
lpDD
,
LPDDSURFACEDESC2
lpDDSurfaceD
esc
)
PURE
;
STDMETHOD
(
Initialize
)(
THIS_
IDirectDraw
*
ddraw
,
DDSURFACEDESC2
*
surface_d
esc
)
PURE
;
STDMETHOD
(
IsLost
)(
THIS
)
PURE
;
STDMETHOD
(
Lock
)(
THIS_
LPRECT
lpDestRect
,
LPDDSURFACEDESC2
lpDDSurfaceDesc
,
DWORD
dwFlags
,
HANDLE
hEvent
)
PURE
;
STDMETHOD
(
ReleaseDC
)(
THIS_
HDC
hDC
)
PURE
;
...
...
@@ -2708,7 +2708,7 @@ DECLARE_INTERFACE_(IDirectDrawGammaControl,IUnknown)
#endif
HRESULT
WINAPI
DirectDrawCreate
(
GUID
*
,
LPDIRECTDRAW
*
,
IUnknown
*
);
HRESULT
WINAPI
DirectDrawCreate
(
GUID
*
driver_guid
,
IDirectDraw
**
ddraw
,
IUnknown
*
outer
);
HRESULT
WINAPI
DirectDrawCreateEx
(
GUID
*
,
LPVOID
*
,
REFIID
,
IUnknown
*
);
HRESULT
WINAPI
DirectDrawCreateClipper
(
DWORD
flags
,
IDirectDrawClipper
**
clipper
,
IUnknown
*
outer
);
...
...
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