WineD3D: Add IWineD3DSurface::SetOverlayPosition

Stefan Dösinger stefan at codeweavers.com
Thu Oct 5 09:37:42 CDT 2006


Patch one if 5 Adding overlay related methods to wined3d
-------------- next part --------------
From 70946dca6aa8de4acece3a1770dfb88c7d0ca192 Mon Sep 17 00:00:00 2001
From: Stefan Doesinger <stefan at codeweavers.com>
Date: Thu, 5 Oct 2006 15:01:37 +0200
Subject: [PATCH] WineD3D: Add SetOverlayPosition
---
 dlls/ddraw/surface.c             |    7 +++++--
 dlls/wined3d/surface.c           |    9 +++++++++
 dlls/wined3d/surface_gdi.c       |    1 +
 dlls/wined3d/wined3d_private.h   |    1 +
 include/wine/wined3d_interface.h |    2 ++
 5 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 111fa9e..16af260 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -1528,8 +1528,11 @@ IDirectDrawSurfaceImpl_SetOverlayPositio
                                           LONG Y)
 {
     ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
-    FIXME("(%p)->(%ld,%ld): Stub!\n", This, X, Y);
-    return DDERR_NOTAOVERLAYSURFACE;
+    TRACE("(%p)->(%ld,%ld): Relay\n", This, X, Y);
+
+    return IWineD3DSurface_SetOverlayPosition(This->WineD3DSurface,
+                                              X,
+                                              Y);
 }
 
 /*****************************************************************************
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index a752665..8ff209d 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3071,6 +3071,14 @@ DWORD WINAPI IWineD3DSurfaceImpl_GetPitc
     return ret;
 }
 
+HRESULT WINAPI IWineD3DSurfaceImpl_SetOverlayPosition(IWineD3DSurface *iface, LONG X, LONG Y) {
+    IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
+
+    FIXME("(%p)->(%d,%d) Stub!\n", This, X, Y);
+
+    return WINED3D_OK;
+}
+
 const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl =
 {
     /* IUnknown */
@@ -3108,6 +3116,7 @@ const IWineD3DSurfaceVtbl IWineD3DSurfac
     IWineD3DSurfaceImpl_SetColorKey,
     IWineD3DSurfaceImpl_GetPitch,
     IWineD3DSurfaceImpl_SetMem,
+    IWineD3DSurfaceImpl_SetOverlayPosition,
     /* Internal use: */
     IWineD3DSurfaceImpl_CleanDirtyRect,
     IWineD3DSurfaceImpl_AddDirtyRect,
diff --git a/dlls/wined3d/surface_gdi.c b/dlls/wined3d/surface_gdi.c
index 95fc785..6376f9b 100644
--- a/dlls/wined3d/surface_gdi.c
+++ b/dlls/wined3d/surface_gdi.c
@@ -1583,6 +1583,7 @@ const IWineD3DSurfaceVtbl IWineGDISurfac
     IWineD3DSurfaceImpl_SetColorKey,
     IWineD3DSurfaceImpl_GetPitch,
     IWineD3DSurfaceImpl_SetMem,
+    IWineD3DSurfaceImpl_SetOverlayPosition,
     /* Internal use: */
     IWineD3DSurfaceImpl_CleanDirtyRect,
     IWineD3DSurfaceImpl_AddDirtyRect,
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index b859ade..0f98482 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -948,6 +948,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_Relea
 DWORD WINAPI IWineD3DSurfaceImpl_GetPitch(IWineD3DSurface *iface);
 HRESULT WINAPI IWineD3DSurfaceImpl_RealizePalette(IWineD3DSurface *iface);
 HRESULT WINAPI IWineD3DSurfaceImpl_SetMem(IWineD3DSurface *iface, void *Mem);
+HRESULT WINAPI IWineD3DSurfaceImpl_SetOverlayPosition(IWineD3DSurface *iface, LONG X, LONG Y);
 
 /* Surface flags: */
 #define SFLAG_OVERSIZE    0x00000001 /* Surface is bigger than gl size, blts only */
diff --git a/include/wine/wined3d_interface.h b/include/wine/wined3d_interface.h
index e76bc55..48a0545 100644
--- a/include/wine/wined3d_interface.h
+++ b/include/wine/wined3d_interface.h
@@ -1133,6 +1133,7 @@ DECLARE_INTERFACE_(IWineD3DSurface,IWine
     STDMETHOD(SetColorKey)(THIS_ DWORD Flags, DDCOLORKEY *CKey) PURE;
     STDMETHOD_(DWORD,GetPitch)(THIS) PURE;
     STDMETHOD(SetMem)(THIS_ void *mem) PURE;
+    STDMETHOD(SetOverlayPosition)(THIS_ LONG X, LONG Y) PURE;
     /* Internally used methods */
     STDMETHOD(CleanDirtyRect)(THIS) PURE;
     STDMETHOD(AddDirtyRect)(THIS_ CONST RECT* pRect) PURE;
@@ -1185,6 +1186,7 @@ #define IWineD3DSurface_RealizePalette(p
 #define IWineD3DSurface_SetColorKey(p, a, b)         (p)->lpVtbl->SetColorKey(p, a, b)
 #define IWineD3DSurface_GetPitch(p)                  (p)->lpVtbl->GetPitch(p)
 #define IWineD3DSurface_SetMem(p, a)                 (p)->lpVtbl->SetMem(p, a)
+#define IWineD3DSurface_SetOverlayPosition(p, a, b)  (p)->lpVtbl->SetOverlayPosition(p, a, b)
 /*** IWineD3DSurface (Internal, no d3d mapping) methods ***/
 #define IWineD3DSurface_CleanDirtyRect(p)            (p)->lpVtbl->CleanDirtyRect(p)
 #define IWineD3DSurface_AddDirtyRect(p,a)            (p)->lpVtbl->AddDirtyRect(p,a)
-- 
1.4.1.1



More information about the wine-patches mailing list