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
588ddee7
Commit
588ddee7
authored
Jun 20, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: COM cleanup for the IDirectDrawClipper iface.
parent
92b467cd
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
39 deletions
+38
-39
clipper.c
dlls/ddraw/clipper.c
+35
-35
ddraw.c
dlls/ddraw/ddraw.c
+1
-1
ddraw_private.h
dlls/ddraw/ddraw_private.h
+1
-2
surface.c
dlls/ddraw/surface.c
+1
-1
No files found.
dlls/ddraw/clipper.c
View file @
588ddee7
...
...
@@ -26,9 +26,10 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
ddraw
);
/*****************************************************************************
* IUnknown methods
*****************************************************************************/
static
inline
IDirectDrawClipperImpl
*
impl_from_IDirectDrawClipper
(
IDirectDrawClipper
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirectDrawClipperImpl
,
IDirectDrawClipper_iface
);
}
/*****************************************************************************
* IDirectDrawClipper::QueryInterface
...
...
@@ -46,9 +47,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw);
* E_NOINTERFACE if the requested interface wasn't found.
*
*****************************************************************************/
static
HRESULT
WINAPI
IDirectDrawClipperImpl_QueryInterface
(
LPDIRECTDRAWCLIPPER
iface
,
REFIID
riid
,
LPVOID
*
ppvObj
)
{
static
HRESULT
WINAPI
IDirectDrawClipperImpl_QueryInterface
(
IDirectDrawClipper
*
iface
,
REFIID
riid
,
void
**
ppvObj
)
{
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppvObj
);
...
...
@@ -69,9 +70,9 @@ static HRESULT WINAPI IDirectDrawClipperImpl_QueryInterface(
* Increases the reference count of the interface, returns the new count
*
*****************************************************************************/
static
ULONG
WINAPI
IDirectDrawClipperImpl_AddRef
(
LPDIRECTDRAWCLIPPER
iface
)
static
ULONG
WINAPI
IDirectDrawClipperImpl_AddRef
(
IDirectDrawClipper
*
iface
)
{
IDirectDrawClipperImpl
*
This
=
(
IDirectDrawClipperImpl
*
)
iface
;
IDirectDrawClipperImpl
*
This
=
impl_from_IDirectDrawClipper
(
iface
)
;
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
This
,
ref
);
...
...
@@ -86,8 +87,9 @@ static ULONG WINAPI IDirectDrawClipperImpl_AddRef( LPDIRECTDRAWCLIPPER iface )
* If the refcount is decreased to 0, the interface is destroyed.
*
*****************************************************************************/
static
ULONG
WINAPI
IDirectDrawClipperImpl_Release
(
IDirectDrawClipper
*
iface
)
{
IDirectDrawClipperImpl
*
This
=
(
IDirectDrawClipperImpl
*
)
iface
;
static
ULONG
WINAPI
IDirectDrawClipperImpl_Release
(
IDirectDrawClipper
*
iface
)
{
IDirectDrawClipperImpl
*
This
=
impl_from_IDirectDrawClipper
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
This
,
ref
);
...
...
@@ -118,10 +120,10 @@ static ULONG WINAPI IDirectDrawClipperImpl_Release(IDirectDrawClipper *iface) {
*
*****************************************************************************/
static
HRESULT
WINAPI
IDirectDrawClipperImpl_SetHwnd
(
LPDIRECTDRAWCLIPPER
iface
,
DWORD
dwFlags
,
HWND
hWnd
)
{
IDirectDrawClipperImpl
*
This
=
(
IDirectDrawClipperImpl
*
)
iface
;
static
HRESULT
WINAPI
IDirectDrawClipperImpl_SetHwnd
(
IDirectDrawClipper
*
iface
,
DWORD
dwFlags
,
HWND
hWnd
)
{
IDirectDrawClipperImpl
*
This
=
impl_from_IDirectDrawClipper
(
iface
)
;
HRESULT
hr
;
TRACE
(
"iface %p, flags %#x, window %p.
\n
"
,
iface
,
dwFlags
,
hWnd
);
...
...
@@ -154,11 +156,10 @@ static HRESULT WINAPI IDirectDrawClipperImpl_SetHwnd(
* RETURNS
* Either DD_OK or DDERR_*
************************************************************************/
static
HRESULT
WINAPI
IDirectDrawClipperImpl_GetClipList
(
LPDIRECTDRAWCLIPPER
iface
,
LPRECT
lpRect
,
LPRGNDATA
lpClipList
,
LPDWORD
lpdwSize
)
static
HRESULT
WINAPI
IDirectDrawClipperImpl_GetClipList
(
IDirectDrawClipper
*
iface
,
RECT
*
lpRect
,
RGNDATA
*
lpClipList
,
DWORD
*
lpdwSize
)
{
IDirectDrawClipperImpl
*
This
=
(
IDirectDrawClipperImpl
*
)
iface
;
IDirectDrawClipperImpl
*
This
=
impl_from_IDirectDrawClipper
(
iface
)
;
HRESULT
hr
;
TRACE
(
"iface %p, rect %s, clip_list %p, clip_list_size %p.
\n
"
,
...
...
@@ -184,10 +185,10 @@ static HRESULT WINAPI IDirectDrawClipperImpl_GetClipList(
* RETURNS
* Either DD_OK or DDERR_*
*****************************************************************************/
static
HRESULT
WINAPI
IDirectDrawClipperImpl_SetClipList
(
LPDIRECTDRAWCLIPPER
iface
,
LPRGNDATA
lprgn
,
DWORD
dwFlag
)
{
IDirectDrawClipperImpl
*
This
=
(
IDirectDrawClipperImpl
*
)
iface
;
static
HRESULT
WINAPI
IDirectDrawClipperImpl_SetClipList
(
IDirectDrawClipper
*
iface
,
RGNDATA
*
lprgn
,
DWORD
dwFlag
)
{
IDirectDrawClipperImpl
*
This
=
impl_from_IDirectDrawClipper
(
iface
)
;
HRESULT
hr
;
TRACE
(
"iface %p, clip_list %p, flags %#x.
\n
"
,
iface
,
lprgn
,
dwFlag
);
...
...
@@ -209,10 +210,9 @@ static HRESULT WINAPI IDirectDrawClipperImpl_SetClipList(
* Return values:
* Always returns DD_OK;
*****************************************************************************/
static
HRESULT
WINAPI
IDirectDrawClipperImpl_GetHWnd
(
LPDIRECTDRAWCLIPPER
iface
,
HWND
*
hWndPtr
)
{
IDirectDrawClipperImpl
*
This
=
(
IDirectDrawClipperImpl
*
)
iface
;
static
HRESULT
WINAPI
IDirectDrawClipperImpl_GetHWnd
(
IDirectDrawClipper
*
iface
,
HWND
*
hWndPtr
)
{
IDirectDrawClipperImpl
*
This
=
impl_from_IDirectDrawClipper
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p, window %p.
\n
"
,
iface
,
hWndPtr
);
...
...
@@ -237,12 +237,12 @@ static HRESULT WINAPI IDirectDrawClipperImpl_GetHWnd(
* DD_OK on success
* DDERR_ALREADYINITIALIZED if this interface isn't initialized already
*****************************************************************************/
static
HRESULT
WINAPI
IDirectDrawClipperImpl_Initialize
(
LPDIRECTDRAWCLIPPER
iface
,
LPDIRECTDRAW
lpDD
,
DWORD
dwFlags
)
{
IDirectDrawClipperImpl
*
This
=
(
IDirectDrawClipperImpl
*
)
iface
;
static
HRESULT
WINAPI
IDirectDrawClipperImpl_Initialize
(
IDirectDrawClipper
*
iface
,
IDirectDraw
*
ddraw
,
DWORD
dwFlags
)
{
IDirectDrawClipperImpl
*
This
=
impl_from_IDirectDrawClipper
(
iface
)
;
TRACE
(
"iface %p, ddraw %p, flags %#x.
\n
"
,
iface
,
lpDD
,
dwFlags
);
TRACE
(
"iface %p, ddraw %p, flags %#x.
\n
"
,
iface
,
ddraw
,
dwFlags
);
EnterCriticalSection
(
&
ddraw_cs
);
if
(
This
->
initialized
)
...
...
@@ -268,9 +268,9 @@ static HRESULT WINAPI IDirectDrawClipperImpl_Initialize(
* Return values:
* DD_OK, because it's a stub
*****************************************************************************/
static
HRESULT
WINAPI
IDirectDrawClipperImpl_IsClipListChanged
(
LPDIRECTDRAWCLIPPER
iface
,
BOOL
*
lpbChanged
)
{
static
HRESULT
WINAPI
IDirectDrawClipperImpl_IsClipListChanged
(
IDirectDrawClipper
*
iface
,
BOOL
*
lpbChanged
)
{
FIXME
(
"iface %p, changed %p stub!
\n
"
,
iface
,
lpbChanged
);
/* XXX What is safest? */
...
...
@@ -297,7 +297,7 @@ static const struct IDirectDrawClipperVtbl ddraw_clipper_vtbl =
HRESULT
ddraw_clipper_init
(
IDirectDrawClipperImpl
*
clipper
)
{
clipper
->
lpVtbl
=
&
ddraw_clipper_vtbl
;
clipper
->
IDirectDrawClipper_iface
.
lpVtbl
=
&
ddraw_clipper_vtbl
;
clipper
->
ref
=
1
;
clipper
->
wineD3DClipper
=
wined3d_clipper_create
();
if
(
!
clipper
->
wineD3DClipper
)
...
...
dlls/ddraw/ddraw.c
View file @
588ddee7
...
...
@@ -3997,7 +3997,7 @@ DirectDrawCreateClipper(DWORD Flags,
}
TRACE
(
"Created clipper %p.
\n
"
,
object
);
*
Clipper
=
(
IDirectDrawClipper
*
)
object
;
*
Clipper
=
&
object
->
IDirectDrawClipper_iface
;
LeaveCriticalSection
(
&
ddraw_cs
);
return
DD_OK
;
}
...
...
dlls/ddraw/ddraw_private.h
View file @
588ddee7
...
...
@@ -358,8 +358,7 @@ static inline IDirect3DDeviceImpl *device_from_device3(IDirect3DDevice3 *iface)
*****************************************************************************/
struct
IDirectDrawClipperImpl
{
/* IUnknown fields */
const
IDirectDrawClipperVtbl
*
lpVtbl
;
IDirectDrawClipper
IDirectDrawClipper_iface
;
LONG
ref
;
struct
wined3d_clipper
*
wineD3DClipper
;
...
...
dlls/ddraw/surface.c
View file @
588ddee7
...
...
@@ -3645,7 +3645,7 @@ static HRESULT WINAPI ddraw_surface7_SetClipper(IDirectDrawSurface7 *iface, IDir
if
(
Clipper
!=
NULL
)
IDirectDrawClipper_AddRef
(
Clipper
);
if
(
oldClipper
)
IDirectDrawClipper_Release
(
(
IDirectDrawClipper
*
)
oldClipper
);
IDirectDrawClipper_Release
(
&
oldClipper
->
IDirectDrawClipper_iface
);
hr
=
wined3d_surface_set_clipper
(
This
->
wined3d_surface
,
This
->
clipper
?
This
->
clipper
->
wineD3DClipper
:
NULL
);
...
...
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