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
b1186d71
Commit
b1186d71
authored
Dec 07, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 07, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Avoid LPDDSURFACEDESC.
parent
9a7bb01a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
26 deletions
+32
-26
ddrawmodes.c
dlls/ddraw/tests/ddrawmodes.c
+5
-5
visual.c
dlls/ddraw/tests/visual.c
+1
-1
d3dtypes.h
include/d3dtypes.h
+1
-1
ddraw.h
include/ddraw.h
+23
-17
ddrawi.h
include/ddrawi.h
+2
-2
No files found.
dlls/ddraw/tests/ddrawmodes.c
View file @
b1186d71
...
...
@@ -36,7 +36,7 @@ static WNDCLASS wc;
static
HWND
hwnd
,
hwnd2
;
static
int
modes_cnt
;
static
int
modes_size
;
static
LPDDSURFACEDESC
modes
;
static
DDSURFACEDESC
*
modes
;
static
RECT
rect_before_create
;
static
RECT
rect_after_delete
;
static
int
modes16bpp_cnt
;
...
...
@@ -292,7 +292,7 @@ static void test_DirectDrawEnumerateExW(void)
ok
(
ret
==
DDERR_UNSUPPORTED
,
"Expected DDERR_UNSUPPORTED, got %d
\n
"
,
ret
);
}
static
void
adddisplaymode
(
LPDDSURFACEDESC
lpddsd
)
static
void
adddisplaymode
(
DDSURFACEDESC
*
lpddsd
)
{
if
(
!
modes
)
modes
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
modes_size
=
2
)
*
sizeof
(
DDSURFACEDESC
));
...
...
@@ -309,7 +309,7 @@ static void flushdisplaymodes(void)
modes_cnt
=
modes_size
=
0
;
}
static
HRESULT
WINAPI
enummodescallback
(
LPDDSURFACEDESC
lpddsd
,
LPVOID
lpContext
)
static
HRESULT
WINAPI
enummodescallback
(
DDSURFACEDESC
*
lpddsd
,
void
*
lpContext
)
{
trace
(
"Width = %i, Height = %i, bpp = %i, Refresh Rate = %i, Pitch = %i, flags =%02X
\n
"
,
lpddsd
->
dwWidth
,
lpddsd
->
dwHeight
,
U1
(
lpddsd
->
ddpfPixelFormat
).
dwRGBBitCount
,
...
...
@@ -338,7 +338,7 @@ static HRESULT WINAPI enummodescallback(LPDDSURFACEDESC lpddsd, LPVOID lpContext
return
DDENUMRET_OK
;
}
static
HRESULT
WINAPI
enummodescallback_16bit
(
LPDDSURFACEDESC
lpddsd
,
LPVOID
lpContext
)
static
HRESULT
WINAPI
enummodescallback_16bit
(
DDSURFACEDESC
*
lpddsd
,
void
*
lpContext
)
{
trace
(
"Width = %i, Height = %i, bpp = %i, Refresh Rate = %i, Pitch = %i, flags =%02X
\n
"
,
lpddsd
->
dwWidth
,
lpddsd
->
dwHeight
,
U1
(
lpddsd
->
ddpfPixelFormat
).
dwRGBBitCount
,
...
...
@@ -376,7 +376,7 @@ static HRESULT WINAPI enummodescallback_16bit(LPDDSURFACEDESC lpddsd, LPVOID lpC
return
DDENUMRET_OK
;
}
static
HRESULT
WINAPI
enummodescallback_count
(
LPDDSURFACEDESC
lpddsd
,
LPVOID
lpContext
)
static
HRESULT
WINAPI
enummodescallback_count
(
DDSURFACEDESC
*
lpddsd
,
void
*
lpContext
)
{
ok
(
lpddsd
->
dwFlags
==
(
DDSD_HEIGHT
|
DDSD_WIDTH
|
DDSD_PIXELFORMAT
|
DDSD_PITCH
|
DDSD_REFRESHRATE
),
"Wrong surface description flags %02X
\n
"
,
lpddsd
->
dwFlags
);
...
...
dlls/ddraw/tests/visual.c
View file @
b1186d71
...
...
@@ -1341,7 +1341,7 @@ out:
ptr = ((D3DTRIANGLE*)(ptr))+1;\
} while (0)
static
HRESULT
CALLBACK
TextureFormatEnumCallback
(
LPDDSURFACEDESC
lpDDSD
,
LPVOID
lpContext
)
static
HRESULT
CALLBACK
TextureFormatEnumCallback
(
DDSURFACEDESC
*
lpDDSD
,
void
*
lpContext
)
{
if
(
lpDDSD
->
ddpfPixelFormat
.
dwFlags
&
DDPF_PALETTEINDEXED8
)
{
*
(
BOOL
*
)
lpContext
=
TRUE
;
...
...
include/d3dtypes.h
View file @
b1186d71
...
...
@@ -72,7 +72,7 @@ typedef LONG D3DFIXED;
#define D3DENUMRET_OK DDENUMRET_OK
typedef
HRESULT
(
CALLBACK
*
LPD3DVALIDATECALLBACK
)(
LPVOID
lpUserArg
,
DWORD
dwOffset
);
typedef
HRESULT
(
CALLBACK
*
LPD3DENUMTEXTUREFORMATSCALLBACK
)(
LPDDSURFACEDESC
lpDdsd
,
LPVOID
lpContext
);
typedef
HRESULT
(
CALLBACK
*
LPD3DENUMTEXTUREFORMATSCALLBACK
)(
DDSURFACEDESC
*
surface_desc
,
void
*
ctx
);
typedef
HRESULT
(
CALLBACK
*
LPD3DENUMPIXELFORMATSCALLBACK
)(
DDPIXELFORMAT
*
format
,
void
*
ctx
);
#ifndef DX_SHARED_DEFINES
...
...
include/ddraw.h
View file @
b1186d71
...
...
@@ -1058,7 +1058,7 @@ typedef BOOL (CALLBACK *LPDDENUMCALLBACKA)(GUID *, LPSTR, LPSTR, LPVOID);
typedef
BOOL
(
CALLBACK
*
LPDDENUMCALLBACKW
)(
GUID
*
,
LPWSTR
,
LPWSTR
,
LPVOID
);
DECL_WINELIB_TYPE_AW
(
LPDDENUMCALLBACK
)
typedef
HRESULT
(
CALLBACK
*
LPDDENUMMODESCALLBACK
)(
LPDDSURFACEDESC
,
LPVOID
);
typedef
HRESULT
(
CALLBACK
*
LPDDENUMMODESCALLBACK
)(
DDSURFACEDESC
*
desc
,
void
*
ctx
);
typedef
HRESULT
(
CALLBACK
*
LPDDENUMMODESCALLBACK2
)(
LPDDSURFACEDESC2
,
LPVOID
);
typedef
HRESULT
(
CALLBACK
*
LPDDENUMSURFACESCALLBACK
)(
struct
IDirectDrawSurface
*
surface
,
DDSURFACEDESC
*
surface_desc
,
void
*
ctx
);
...
...
@@ -1329,11 +1329,13 @@ DECLARE_INTERFACE_(IDirectDraw,IUnknown)
struct
IDirectDrawSurface
**
surface
,
IUnknown
*
outer
)
PURE
;
STDMETHOD
(
DuplicateSurface
)(
THIS_
struct
IDirectDrawSurface
*
src_surface
,
struct
IDirectDrawSurface
**
dst_surface
)
PURE
;
STDMETHOD
(
EnumDisplayModes
)(
THIS_
DWORD
dwFlags
,
LPDDSURFACEDESC
lpDDSurfaceDesc
,
LPVOID
lpContext
,
LPDDENUMMODESCALLBACK
lpEnumModesCallback
)
PURE
;
STDMETHOD
(
EnumSurfaces
)(
THIS_
DWORD
dwFlags
,
LPDDSURFACEDESC
lpDDSD
,
LPVOID
lpContext
,
LPDDENUMSURFACESCALLBACK
lpEnumSurfacesCallback
)
PURE
;
STDMETHOD
(
EnumDisplayModes
)(
THIS_
DWORD
flags
,
DDSURFACEDESC
*
surface_desc
,
void
*
ctx
,
LPDDENUMMODESCALLBACK
cb
)
PURE
;
STDMETHOD
(
EnumSurfaces
)(
THIS_
DWORD
flags
,
DDSURFACEDESC
*
surface_desc
,
void
*
ctx
,
LPDDENUMSURFACESCALLBACK
cb
)
PURE
;
STDMETHOD
(
FlipToGDISurface
)(
THIS
)
PURE
;
STDMETHOD
(
GetCaps
)(
THIS_
DDCAPS
*
driver_caps
,
DDCAPS
*
hel_caps
)
PURE
;
STDMETHOD
(
GetDisplayMode
)(
THIS_
LPDDSURFACEDESC
lpDDSurfaceD
esc
)
PURE
;
STDMETHOD
(
GetDisplayMode
)(
THIS_
DDSURFACEDESC
*
surface_d
esc
)
PURE
;
STDMETHOD
(
GetFourCCCodes
)(
THIS_
LPDWORD
lpNumCodes
,
LPDWORD
lpCodes
)
PURE
;
STDMETHOD
(
GetGDISurface
)(
THIS_
struct
IDirectDrawSurface
**
surface
)
PURE
;
STDMETHOD
(
GetMonitorFrequency
)(
THIS_
LPDWORD
lpdwFrequency
)
PURE
;
...
...
@@ -1439,11 +1441,13 @@ DECLARE_INTERFACE_(IDirectDraw2,IUnknown)
struct
IDirectDrawSurface
**
surface
,
IUnknown
*
outer
)
PURE
;
/*1c*/
STDMETHOD
(
DuplicateSurface
)(
THIS_
struct
IDirectDrawSurface
*
src_surface
,
struct
IDirectDrawSurface
**
dst_surface
)
PURE
;
/*20*/
STDMETHOD
(
EnumDisplayModes
)(
THIS_
DWORD
dwFlags
,
LPDDSURFACEDESC
lpDDSurfaceDesc
,
LPVOID
lpContext
,
LPDDENUMMODESCALLBACK
lpEnumModesCallback
)
PURE
;
/*24*/
STDMETHOD
(
EnumSurfaces
)(
THIS_
DWORD
dwFlags
,
LPDDSURFACEDESC
lpDDSD
,
LPVOID
lpContext
,
LPDDENUMSURFACESCALLBACK
lpEnumSurfacesCallback
)
PURE
;
/*20*/
STDMETHOD
(
EnumDisplayModes
)(
THIS_
DWORD
flags
,
DDSURFACEDESC
*
surface_desc
,
void
*
ctx
,
LPDDENUMMODESCALLBACK
cb
)
PURE
;
/*24*/
STDMETHOD
(
EnumSurfaces
)(
THIS_
DWORD
flags
,
DDSURFACEDESC
*
surface_desc
,
void
*
ctx
,
LPDDENUMSURFACESCALLBACK
cb
)
PURE
;
/*28*/
STDMETHOD
(
FlipToGDISurface
)(
THIS
)
PURE
;
/*2c*/
STDMETHOD
(
GetCaps
)(
THIS_
DDCAPS
*
driver_caps
,
DDCAPS
*
hel_caps
)
PURE
;
/*30*/
STDMETHOD
(
GetDisplayMode
)(
THIS_
LPDDSURFACEDESC
lpDDSurfaceD
esc
)
PURE
;
/*30*/
STDMETHOD
(
GetDisplayMode
)(
THIS_
DDSURFACEDESC
*
surface_d
esc
)
PURE
;
/*34*/
STDMETHOD
(
GetFourCCCodes
)(
THIS_
LPDWORD
lpNumCodes
,
LPDWORD
lpCodes
)
PURE
;
/*38*/
STDMETHOD
(
GetGDISurface
)(
THIS_
struct
IDirectDrawSurface
**
surface
)
PURE
;
/*3c*/
STDMETHOD
(
GetMonitorFrequency
)(
THIS_
LPDWORD
lpdwFrequency
)
PURE
;
...
...
@@ -1537,11 +1541,13 @@ DECLARE_INTERFACE_(IDirectDraw3,IUnknown)
struct
IDirectDrawSurface
**
surface
,
IUnknown
*
outer
)
PURE
;
/*1c*/
STDMETHOD
(
DuplicateSurface
)(
THIS_
struct
IDirectDrawSurface
*
src_surface
,
struct
IDirectDrawSurface
**
dst_surface
)
PURE
;
/*20*/
STDMETHOD
(
EnumDisplayModes
)(
THIS_
DWORD
dwFlags
,
LPDDSURFACEDESC
lpDDSurfaceDesc
,
LPVOID
lpContext
,
LPDDENUMMODESCALLBACK
lpEnumModesCallback
)
PURE
;
/*24*/
STDMETHOD
(
EnumSurfaces
)(
THIS_
DWORD
dwFlags
,
LPDDSURFACEDESC
lpDDSD
,
LPVOID
lpContext
,
LPDDENUMSURFACESCALLBACK
lpEnumSurfacesCallback
)
PURE
;
/*20*/
STDMETHOD
(
EnumDisplayModes
)(
THIS_
DWORD
flags
,
DDSURFACEDESC
*
surface_desc
,
void
*
ctx
,
LPDDENUMMODESCALLBACK
cb
)
PURE
;
/*24*/
STDMETHOD
(
EnumSurfaces
)(
THIS_
DWORD
flags
,
DDSURFACEDESC
*
surface_desc
,
void
*
ctx
,
LPDDENUMSURFACESCALLBACK
cb
)
PURE
;
/*28*/
STDMETHOD
(
FlipToGDISurface
)(
THIS
)
PURE
;
/*2c*/
STDMETHOD
(
GetCaps
)(
THIS_
DDCAPS
*
driver_caps
,
DDCAPS
*
hel_caps
)
PURE
;
/*30*/
STDMETHOD
(
GetDisplayMode
)(
THIS_
LPDDSURFACEDESC
lpDDSurfaceD
esc
)
PURE
;
/*30*/
STDMETHOD
(
GetDisplayMode
)(
THIS_
DDSURFACEDESC
*
surface_d
esc
)
PURE
;
/*34*/
STDMETHOD
(
GetFourCCCodes
)(
THIS_
LPDWORD
lpNumCodes
,
LPDWORD
lpCodes
)
PURE
;
/*38*/
STDMETHOD
(
GetGDISurface
)(
THIS_
struct
IDirectDrawSurface
**
surface
)
PURE
;
/*3c*/
STDMETHOD
(
GetMonitorFrequency
)(
THIS_
LPDWORD
lpdwFrequency
)
PURE
;
...
...
@@ -1892,10 +1898,10 @@ DECLARE_INTERFACE_(IDirectDrawSurface,IUnknown)
/*4c*/
STDMETHOD
(
GetOverlayPosition
)(
THIS_
LPLONG
lplX
,
LPLONG
lplY
)
PURE
;
/*50*/
STDMETHOD
(
GetPalette
)(
THIS_
IDirectDrawPalette
**
palette
)
PURE
;
/*54*/
STDMETHOD
(
GetPixelFormat
)(
THIS_
DDPIXELFORMAT
*
format
)
PURE
;
/*58*/
STDMETHOD
(
GetSurfaceDesc
)(
THIS_
LPDDSURFACEDESC
lpDDSurfaceD
esc
)
PURE
;
/*58*/
STDMETHOD
(
GetSurfaceDesc
)(
THIS_
DDSURFACEDESC
*
surface_d
esc
)
PURE
;
/*5c*/
STDMETHOD
(
Initialize
)(
THIS_
IDirectDraw
*
ddraw
,
DDSURFACEDESC
*
surface_desc
)
PURE
;
/*60*/
STDMETHOD
(
IsLost
)(
THIS
)
PURE
;
/*64*/
STDMETHOD
(
Lock
)(
THIS_
LPRECT
lpDestRect
,
LPDDSURFACEDESC
lpDDSurfaceDesc
,
DWORD
dwFlags
,
HANDLE
hE
vent
)
PURE
;
/*64*/
STDMETHOD
(
Lock
)(
THIS_
RECT
*
rect
,
DDSURFACEDESC
*
surface_desc
,
DWORD
flags
,
HANDLE
e
vent
)
PURE
;
/*68*/
STDMETHOD
(
ReleaseDC
)(
THIS_
HDC
hDC
)
PURE
;
/*6c*/
STDMETHOD
(
Restore
)(
THIS
)
PURE
;
/*70*/
STDMETHOD
(
SetClipper
)(
THIS_
IDirectDrawClipper
*
clipper
)
PURE
;
...
...
@@ -2026,10 +2032,10 @@ DECLARE_INTERFACE_(IDirectDrawSurface2,IUnknown)
STDMETHOD
(
GetOverlayPosition
)(
THIS_
LPLONG
lplX
,
LPLONG
lplY
)
PURE
;
STDMETHOD
(
GetPalette
)(
THIS_
IDirectDrawPalette
**
palette
)
PURE
;
STDMETHOD
(
GetPixelFormat
)(
THIS_
DDPIXELFORMAT
*
format
)
PURE
;
STDMETHOD
(
GetSurfaceDesc
)(
THIS_
LPDDSURFACEDESC
lpDDSurfaceD
esc
)
PURE
;
STDMETHOD
(
GetSurfaceDesc
)(
THIS_
DDSURFACEDESC
*
surface_d
esc
)
PURE
;
STDMETHOD
(
Initialize
)(
THIS_
IDirectDraw
*
ddraw
,
DDSURFACEDESC
*
surface_desc
)
PURE
;
STDMETHOD
(
IsLost
)(
THIS
)
PURE
;
STDMETHOD
(
Lock
)(
THIS_
LPRECT
lpDestRect
,
LPDDSURFACEDESC
lpDDSurfaceDesc
,
DWORD
dwFlags
,
HANDLE
hE
vent
)
PURE
;
STDMETHOD
(
Lock
)(
THIS_
RECT
*
rect
,
DDSURFACEDESC
*
surface_desc
,
DWORD
flags
,
HANDLE
e
vent
)
PURE
;
STDMETHOD
(
ReleaseDC
)(
THIS_
HDC
hDC
)
PURE
;
STDMETHOD
(
Restore
)(
THIS
)
PURE
;
STDMETHOD
(
SetClipper
)(
THIS_
IDirectDrawClipper
*
clipper
)
PURE
;
...
...
@@ -2172,10 +2178,10 @@ DECLARE_INTERFACE_(IDirectDrawSurface3,IUnknown)
STDMETHOD
(
GetOverlayPosition
)(
THIS_
LPLONG
lplX
,
LPLONG
lplY
)
PURE
;
STDMETHOD
(
GetPalette
)(
THIS_
IDirectDrawPalette
**
palette
)
PURE
;
STDMETHOD
(
GetPixelFormat
)(
THIS_
DDPIXELFORMAT
*
format
)
PURE
;
STDMETHOD
(
GetSurfaceDesc
)(
THIS_
LPDDSURFACEDESC
lpDDSurfaceD
esc
)
PURE
;
STDMETHOD
(
GetSurfaceDesc
)(
THIS_
DDSURFACEDESC
*
surface_d
esc
)
PURE
;
STDMETHOD
(
Initialize
)(
THIS_
IDirectDraw
*
ddraw
,
DDSURFACEDESC
*
surface_desc
)
PURE
;
STDMETHOD
(
IsLost
)(
THIS
)
PURE
;
STDMETHOD
(
Lock
)(
THIS_
LPRECT
lpDestRect
,
LPDDSURFACEDESC
lpDDSurfaceDesc
,
DWORD
dwFlags
,
HANDLE
hE
vent
)
PURE
;
STDMETHOD
(
Lock
)(
THIS_
RECT
*
rect
,
DDSURFACEDESC
*
surface_desc
,
DWORD
flags
,
HANDLE
e
vent
)
PURE
;
STDMETHOD
(
ReleaseDC
)(
THIS_
HDC
hDC
)
PURE
;
STDMETHOD
(
Restore
)(
THIS
)
PURE
;
STDMETHOD
(
SetClipper
)(
THIS_
IDirectDrawClipper
*
clipper
)
PURE
;
...
...
@@ -2192,7 +2198,7 @@ DECLARE_INTERFACE_(IDirectDrawSurface3,IUnknown)
STDMETHOD
(
PageLock
)(
THIS_
DWORD
dwFlags
)
PURE
;
STDMETHOD
(
PageUnlock
)(
THIS_
DWORD
dwFlags
)
PURE
;
/* added in v3 */
STDMETHOD
(
SetSurfaceDesc
)(
THIS_
LPDDSURFACEDESC
lpDDSD
,
DWORD
dwF
lags
)
PURE
;
STDMETHOD
(
SetSurfaceDesc
)(
THIS_
DDSURFACEDESC
*
surface_desc
,
DWORD
f
lags
)
PURE
;
};
#undef INTERFACE
...
...
include/ddrawi.h
View file @
b1186d71
...
...
@@ -505,7 +505,7 @@ typedef struct _DDHAL_SETMODEDATA {
typedef
struct
_DDHAL_CREATESURFACEDATA
{
LPDDRAWI_DIRECTDRAW_GBL
lpDD
;
LPDDSURFACEDESC
lpDDSurfaceDesc
;
DDSURFACEDESC
*
lpDDSurfaceDesc
;
LPDDRAWI_DDRAWSURFACE_LCL
*
lplpSList
;
DWORD
dwSCnt
;
HRESULT
ddRVal
;
...
...
@@ -514,7 +514,7 @@ typedef struct _DDHAL_CREATESURFACEDATA {
typedef
struct
_DDHAL_CANCREATESURFACEDATA
{
LPDDRAWI_DIRECTDRAW_GBL
lpDD
;
LPDDSURFACEDESC
lpDDSurfaceDesc
;
DDSURFACEDESC
*
lpDDSurfaceDesc
;
DWORD
bIsDifferentPixelFormat
;
HRESULT
ddRVal
;
LPDDHAL_CANCREATESURFACE
CanCreateSurface
;
...
...
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