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
abe0ee33
Commit
abe0ee33
authored
Jun 08, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: COM cleanup for the IDirectDrawGammaControl iface.
parent
e85668b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
ddraw_private.h
dlls/ddraw/ddraw_private.h
+1
-1
surface.c
dlls/ddraw/surface.c
+14
-11
No files found.
dlls/ddraw/ddraw_private.h
View file @
abe0ee33
...
...
@@ -155,7 +155,7 @@ struct IDirectDrawSurfaceImpl
IDirectDrawSurface7
IDirectDrawSurface7_iface
;
IDirectDrawSurface4
IDirectDrawSurface4_iface
;
IDirectDrawSurface3
IDirectDrawSurface3_iface
;
const
IDirectDrawGammaControlVtbl
*
IDirectDrawGammaControl_vtbl
;
IDirectDrawGammaControl
IDirectDrawGammaControl_iface
;
const
IDirect3DTexture2Vtbl
*
IDirect3DTexture2_vtbl
;
const
IDirect3DTextureVtbl
*
IDirect3DTexture_vtbl
;
...
...
dlls/ddraw/surface.c
View file @
abe0ee33
...
...
@@ -31,10 +31,9 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
ddraw
);
static
inline
IDirectDrawSurfaceImpl
*
surface_from_gamma_c
ontrol
(
IDirectDrawGammaControl
*
iface
)
static
inline
IDirectDrawSurfaceImpl
*
impl_from_IDirectDrawGammaC
ontrol
(
IDirectDrawGammaControl
*
iface
)
{
return
(
IDirectDrawSurfaceImpl
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
IDirectDrawSurfaceImpl
,
IDirectDrawGammaControl_vtbl
));
return
CONTAINING_RECORD
(
iface
,
IDirectDrawSurfaceImpl
,
IDirectDrawGammaControl_iface
);
}
/*****************************************************************************
...
...
@@ -98,7 +97,7 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
else
if
(
IsEqualGUID
(
riid
,
&
IID_IDirectDrawGammaControl
)
)
{
IUnknown_AddRef
(
iface
);
*
obj
=
&
This
->
IDirectDrawGammaControl_
vtbl
;
*
obj
=
&
This
->
IDirectDrawGammaControl_
iface
;
TRACE
(
"(%p) returning IDirectDrawGammaControl interface at %p
\n
"
,
This
,
*
obj
);
return
S_OK
;
}
...
...
@@ -159,9 +158,11 @@ static HRESULT WINAPI ddraw_surface3_QueryInterface(IDirectDrawSurface3 *iface,
return
ddraw_surface7_QueryInterface
(
&
This
->
IDirectDrawSurface7_iface
,
riid
,
object
);
}
static
HRESULT
WINAPI
ddraw_gamma_control_QueryInterface
(
IDirectDrawGammaControl
*
iface
,
REFIID
riid
,
void
**
object
)
static
HRESULT
WINAPI
ddraw_gamma_control_QueryInterface
(
IDirectDrawGammaControl
*
iface
,
REFIID
riid
,
void
**
object
)
{
IDirectDrawSurfaceImpl
*
This
=
surface_from_gamma_control
(
iface
);
IDirectDrawSurfaceImpl
*
This
=
impl_from_IDirectDrawGammaControl
(
iface
);
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
return
ddraw_surface7_QueryInterface
(
&
This
->
IDirectDrawSurface7_iface
,
riid
,
object
);
...
...
@@ -230,7 +231,8 @@ static ULONG WINAPI ddraw_surface3_AddRef(IDirectDrawSurface3 *iface)
static
ULONG
WINAPI
ddraw_gamma_control_AddRef
(
IDirectDrawGammaControl
*
iface
)
{
IDirectDrawSurfaceImpl
*
This
=
surface_from_gamma_control
(
iface
);
IDirectDrawSurfaceImpl
*
This
=
impl_from_IDirectDrawGammaControl
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
ddraw_surface7_AddRef
(
&
This
->
IDirectDrawSurface7_iface
);
...
...
@@ -448,7 +450,8 @@ static ULONG WINAPI ddraw_surface3_Release(IDirectDrawSurface3 *iface)
static
ULONG
WINAPI
ddraw_gamma_control_Release
(
IDirectDrawGammaControl
*
iface
)
{
IDirectDrawSurfaceImpl
*
This
=
surface_from_gamma_control
(
iface
);
IDirectDrawSurfaceImpl
*
This
=
impl_from_IDirectDrawGammaControl
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
ddraw_surface7_Release
(
&
This
->
IDirectDrawSurface7_iface
);
...
...
@@ -3410,7 +3413,7 @@ static HRESULT WINAPI ddraw_surface3_SetPalette(IDirectDrawSurface3 *iface, IDir
static
HRESULT
WINAPI
ddraw_gamma_control_GetGammaRamp
(
IDirectDrawGammaControl
*
iface
,
DWORD
flags
,
DDGAMMARAMP
*
gamma_ramp
)
{
IDirectDrawSurfaceImpl
*
surface
=
surface_from_gamma_c
ontrol
(
iface
);
IDirectDrawSurfaceImpl
*
surface
=
impl_from_IDirectDrawGammaC
ontrol
(
iface
);
TRACE
(
"iface %p, flags %#x, gamma_ramp %p.
\n
"
,
iface
,
flags
,
gamma_ramp
);
...
...
@@ -3452,7 +3455,7 @@ static HRESULT WINAPI ddraw_gamma_control_GetGammaRamp(IDirectDrawGammaControl *
static
HRESULT
WINAPI
ddraw_gamma_control_SetGammaRamp
(
IDirectDrawGammaControl
*
iface
,
DWORD
flags
,
DDGAMMARAMP
*
gamma_ramp
)
{
IDirectDrawSurfaceImpl
*
surface
=
surface_from_gamma_c
ontrol
(
iface
);
IDirectDrawSurfaceImpl
*
surface
=
impl_from_IDirectDrawGammaC
ontrol
(
iface
);
TRACE
(
"iface %p, flags %#x, gamma_ramp %p.
\n
"
,
iface
,
flags
,
gamma_ramp
);
...
...
@@ -4135,7 +4138,7 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr
surface
->
IDirectDrawSurface7_iface
.
lpVtbl
=
&
ddraw_surface7_vtbl
;
surface
->
IDirectDrawSurface4_iface
.
lpVtbl
=
&
ddraw_surface4_vtbl
;
surface
->
IDirectDrawSurface3_iface
.
lpVtbl
=
&
ddraw_surface3_vtbl
;
surface
->
IDirectDrawGammaControl_
v
tbl
=
&
ddraw_gamma_control_vtbl
;
surface
->
IDirectDrawGammaControl_
iface
.
lpV
tbl
=
&
ddraw_gamma_control_vtbl
;
surface
->
IDirect3DTexture2_vtbl
=
&
d3d_texture2_vtbl
;
surface
->
IDirect3DTexture_vtbl
=
&
d3d_texture1_vtbl
;
surface
->
ref
=
1
;
...
...
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