ddraw/user.c patch

Ove Kaaven ovehk at ping.uio.no
Mon Apr 16 18:06:00 CDT 2001


Hmm, this didn't take editing...

Log:
Ove Kaaven <ovek at transgaming.com>
Removed User_DirectDraw_GetCaps. Using Main_DirectDraw_GetCaps instead,
and the User constructor filling in the main capability bits.

Index: wine/dlls/ddraw/ddraw/dga2.c
diff -u wine/dlls/ddraw/ddraw/dga2.c:1.1.1.6 wine/dlls/ddraw/ddraw/dga2.c:1.9
--- wine/dlls/ddraw/ddraw/dga2.c:1.1.1.6	Fri Mar  2 03:32:03 2001
+++ wine/dlls/ddraw/ddraw/dga2.c	Mon Apr  9 08:00:17 2001
@@ -411,7 +411,7 @@
     User_DirectDraw_EnumDisplayModes,
     Main_DirectDraw_EnumSurfaces,
     Main_DirectDraw_FlipToGDISurface,
-    User_DirectDraw_GetCaps,
+    Main_DirectDraw_GetCaps,
     Main_DirectDraw_GetDisplayMode,
     Main_DirectDraw_GetFourCCCodes,
     Main_DirectDraw_GetGDISurface,
Index: wine/dlls/ddraw/ddraw/dga2.h
diff -u wine/dlls/ddraw/ddraw/dga2.h:1.1.1.1 wine/dlls/ddraw/ddraw/dga2.h:1.3
--- wine/dlls/ddraw/ddraw/dga2.h:1.1.1.1	Thu Jan  4 23:58:29 2001
+++ wine/dlls/ddraw/ddraw/dga2.h	Mon Jan 29 12:55:06 2001
@@ -1,4 +1,4 @@
-/* Copyright 2000 TransGaming Technologies, Inc. */
+/* Copyright 2000-2001 TransGaming Technologies, Inc. */
 #ifndef WINE_DDRAW_DDRAW_DGA2_H_INCLUDED
 #define WINE_DDRAW_DDRAW_DGA2_H_INCLUDED
 
Index: wine/dlls/ddraw/ddraw/user.c
diff -u wine/dlls/ddraw/ddraw/user.c:1.1.1.5 wine/dlls/ddraw/ddraw/user.c:1.13
--- wine/dlls/ddraw/ddraw/user.c:1.1.1.5	Sat Apr 14 17:39:40 2001
+++ wine/dlls/ddraw/ddraw/user.c	Mon Apr  9 08:00:17 2001
@@ -144,6 +144,45 @@
 
     ICOM_INIT_INTERFACE(This, IDirectDraw7, User_DirectDraw_VTable);
 
+    /* capabilities */
+#define BLIT_CAPS (DDCAPS_BLT | DDCAPS_BLTCOLORFILL | DDCAPS_BLTDEPTHFILL \
+	  | DDCAPS_BLTSTRETCH | DDCAPS_CANBLTSYSMEM | DDCAPS_CANCLIP	  \
+	  | DDCAPS_CANCLIPSTRETCHED | DDCAPS_COLORKEY			  \
+	  | DDCAPS_COLORKEYHWASSIST)
+#define CKEY_CAPS (DDCKEYCAPS_DESTBLT | DDCKEYCAPS_SRCBLT)
+#define FX_CAPS (DDFXCAPS_BLTALPHA | DDFXCAPS_BLTMIRRORLEFTRIGHT	\
+		| DDFXCAPS_BLTMIRRORUPDOWN | DDFXCAPS_BLTROTATION90	\
+		| DDFXCAPS_BLTSHRINKX | DDFXCAPS_BLTSHRINKXN		\
+		| DDFXCAPS_BLTSHRINKY | DDFXCAPS_BLTSHRINKXN		\
+		| DDFXCAPS_BLTSTRETCHX | DDFXCAPS_BLTSTRETCHXN		\
+		| DDFXCAPS_BLTSTRETCHY | DDFXCAPS_BLTSTRETCHYN)
+    This->caps.dwCaps |= DDCAPS_GDI | DDCAPS_PALETTE | BLIT_CAPS;
+    This->caps.dwCaps2 |= DDCAPS2_CERTIFIED | DDCAPS2_NOPAGELOCKREQUIRED |
+			  DDCAPS2_PRIMARYGAMMA | DDCAPS2_WIDESURFACES;
+    This->caps.dwCKeyCaps |= CKEY_CAPS;
+    This->caps.dwFXCaps |= FX_CAPS;
+    This->caps.dwPalCaps |= DDPCAPS_8BIT | DDPCAPS_PRIMARYSURFACE;
+    This->caps.dwVidMemTotal = 16*1024*1024;
+    This->caps.dwVidMemFree = 16*1024*1024;
+    This->caps.dwSVBCaps |= BLIT_CAPS;
+    This->caps.dwSVBCKeyCaps |= CKEY_CAPS;
+    This->caps.dwSVBFXCaps |= FX_CAPS;
+    This->caps.dwVSBCaps |= BLIT_CAPS;
+    This->caps.dwVSBCKeyCaps |= CKEY_CAPS;
+    This->caps.dwVSBFXCaps |= FX_CAPS;
+    This->caps.dwSSBCaps |= BLIT_CAPS;
+    This->caps.dwSSBCKeyCaps |= CKEY_CAPS;
+    This->caps.dwSSBFXCaps |= FX_CAPS;
+    This->caps.ddsCaps.dwCaps |= DDSCAPS_ALPHA | DDSCAPS_BACKBUFFER |
+				 DDSCAPS_FLIP | DDSCAPS_FRONTBUFFER |
+				 DDSCAPS_OFFSCREENPLAIN | DDSCAPS_PALETTE |
+				 DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY |
+				 DDSCAPS_VIDEOMEMORY | DDSCAPS_VISIBLE;
+    This->caps.ddsOldCaps.dwCaps = This->caps.ddsCaps.dwCaps;
+#undef BLIT_CAPS
+#undef CKEY_CAPS
+#undef FX_CAPS
+
     return S_OK;
 }
 
@@ -322,6 +361,7 @@
 /* EnumSurfaces: generic */
 /* FlipToGDISurface: ??? */
 
+#if 0
 HRESULT WINAPI
 User_DirectDraw_GetCaps(LPDIRECTDRAW7 iface, LPDDCAPS pDriverCaps,
 			LPDDCAPS pHELCaps)
@@ -441,6 +481,7 @@
 
     return DD_OK;
 }
+#endif
 
 HRESULT WINAPI
 User_DirectDraw_GetDeviceIdentifier(LPDIRECTDRAW7 iface,
@@ -508,7 +549,7 @@
     User_DirectDraw_EnumDisplayModes,
     Main_DirectDraw_EnumSurfaces,
     Main_DirectDraw_FlipToGDISurface,
-    User_DirectDraw_GetCaps,
+    Main_DirectDraw_GetCaps,
     Main_DirectDraw_GetDisplayMode,
     Main_DirectDraw_GetFourCCCodes,
     Main_DirectDraw_GetGDISurface,
Index: wine/dlls/ddraw/ddraw/user.h
diff -u wine/dlls/ddraw/ddraw/user.h:1.1.1.1 wine/dlls/ddraw/ddraw/user.h:1.4
--- wine/dlls/ddraw/ddraw/user.h:1.1.1.1	Thu Jan  4 23:58:30 2001
+++ wine/dlls/ddraw/ddraw/user.h	Mon Apr  9 08:00:17 2001
@@ -1,4 +1,4 @@
-/* Copyright 2000 TransGaming Technologies Inc. */
+/* Copyright 2000-2001 TransGaming Technologies Inc. */
 
 #ifndef WINE_DDRAW_DDRAW_USER_H_INCLUDED
 #define WINE_DDRAW_DDRAW_USER_H_INCLUDED
@@ -35,9 +35,6 @@
 User_DirectDraw_EnumDisplayModes(LPDIRECTDRAW7 iface, DWORD dwFlags,
 				 LPDDSURFACEDESC2 pDDSD, LPVOID context,
 				 LPDDENUMMODESCALLBACK2 callback);
-HRESULT WINAPI
-User_DirectDraw_GetCaps(LPDIRECTDRAW7 iface, LPDDCAPS pDriverCaps,
-			LPDDCAPS pHELCaps);
 HRESULT WINAPI
 User_DirectDraw_GetDeviceIdentifier(LPDIRECTDRAW7 iface,
 				    LPDDDEVICEIDENTIFIER2 pDDDI,
Index: wine/dlls/ddraw/ddraw/xvidmode.c
diff -u wine/dlls/ddraw/ddraw/xvidmode.c:1.1.1.5 wine/dlls/ddraw/ddraw/xvidmode.c:1.11
--- wine/dlls/ddraw/ddraw/xvidmode.c:1.1.1.5	Mon Jan 29 09:21:20 2001
+++ wine/dlls/ddraw/ddraw/xvidmode.c	Mon Apr  9 08:00:17 2001
@@ -1,7 +1,7 @@
 /*	DirectDraw driver for User-based primary surfaces
  *	with XF86VidMode mode switching in full-screen mode.
  *
- * Copyright 2000 TransGaming Technologies Inc.
+ * Copyright 2000-2001 TransGaming Technologies Inc.
  */
 
 #include "config.h"
@@ -373,7 +373,7 @@
     User_DirectDraw_EnumDisplayModes,
     Main_DirectDraw_EnumSurfaces,
     Main_DirectDraw_FlipToGDISurface,
-    User_DirectDraw_GetCaps,
+    Main_DirectDraw_GetCaps,
     Main_DirectDraw_GetDisplayMode,
     Main_DirectDraw_GetFourCCCodes,
     Main_DirectDraw_GetGDISurface,
Index: wine/dlls/ddraw/ddraw/xvidmode.h
diff -u wine/dlls/ddraw/ddraw/xvidmode.h:1.1.1.1 wine/dlls/ddraw/ddraw/xvidmode.h:1.2
--- wine/dlls/ddraw/ddraw/xvidmode.h:1.1.1.1	Thu Jan  4 23:58:30 2001
+++ wine/dlls/ddraw/ddraw/xvidmode.h	Mon Jan 29 12:55:07 2001
@@ -1,4 +1,4 @@
-/* Copyright 2000 TransGaming Technologies, Inc. */
+/* Copyright 2000-2001 TransGaming Technologies, Inc. */
 #ifndef WINE_DDRAW_DDRAW_XVIDMODE_H_INCLUDED
 #define WINE_DDRAW_DDRAW_XVIDMODE_H_INCLUDED
 





More information about the wine-patches mailing list