[ros-diffs] [khornicek] 43812: - fix DDrawSurface_Release for now + more minor fixes

khornicek at svn.reactos.org khornicek at svn.reactos.org
Wed Oct 28 16:22:45 CET 2009


Author: khornicek
Date: Wed Oct 28 16:22:45 2009
New Revision: 43812

URL: http://svn.reactos.org/svn/reactos?rev=43812&view=rev
Log:
- fix DDrawSurface_Release for now + more minor fixes

Added:
    branches/reactx/reactos/dll/directx/ddraw/Palette/palette_main.c   (with props)
Modified:
    branches/reactx/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c
    branches/reactx/reactos/dll/directx/ddraw/Surface/surface_main.c
    branches/reactx/reactos/dll/directx/ddraw/ddraw.rbuild

Modified: branches/reactx/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c
URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c?rev=43812&r1=43811&r2=43812&view=diff
==============================================================================
--- branches/reactx/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c [iso-8859-1] (original)
+++ branches/reactx/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c [iso-8859-1] Wed Oct 28 16:22:45 2009
@@ -117,7 +117,7 @@
         else
         {
             *obj = NULL;
-            DX_STUB_str("E_NOINTERFACE");
+            DX_STUB_str("E_NOINTERFACE\n");
             retVal = E_NOINTERFACE;
         }
     }
@@ -533,6 +533,9 @@
     }
     _SEH2_END;
 
+    if(*ppSurf != NULL)
+        Main_DirectDraw_AddRef(This);
+
     LeaveCriticalSection(&ddcs);
     return ret;
 }
@@ -540,11 +543,3 @@
 /* 5 of 31 DirectDraw7_Vtable api are working simluare to windows */
 /* 8 of 31 DirectDraw7_Vtable api are under devloping / testing */
 
-
-
-
-
-
-
-
-

Added: branches/reactx/reactos/dll/directx/ddraw/Palette/palette_main.c
URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddraw/Palette/palette_main.c?rev=43812&view=auto
==============================================================================
--- branches/reactx/reactos/dll/directx/ddraw/Palette/palette_main.c (added)
+++ branches/reactx/reactos/dll/directx/ddraw/Palette/palette_main.c [iso-8859-1] Wed Oct 28 16:22:45 2009
@@ -1,0 +1,12 @@
+/* $Id: palette.c $
+ *
+ * COPYRIGHT:            See COPYING in the top level directory
+ * PROJECT:              ReactOS DirectX
+ * FILE:                 ddraw/Palette/palette.c
+ * PURPOSE:              IDirectDrawPalette Implementation
+ * PROGRAMMER:           
+ *
+ */
+
+#include "rosdraw.h"
+

Propchange: branches/reactx/reactos/dll/directx/ddraw/Palette/palette_main.c
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: branches/reactx/reactos/dll/directx/ddraw/Surface/surface_main.c
URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddraw/Surface/surface_main.c?rev=43812&r1=43811&r2=43812&view=diff
==============================================================================
--- branches/reactx/reactos/dll/directx/ddraw/Surface/surface_main.c [iso-8859-1] (original)
+++ branches/reactx/reactos/dll/directx/ddraw/Surface/surface_main.c [iso-8859-1] Wed Oct 28 16:22:45 2009
@@ -264,12 +264,27 @@
 
 ULONG WINAPI Main_DDrawSurface_Release(LPDDRAWI_DDRAWSURFACE_INT This)
 {
-
-    /* FIXME
-       This is not right exiame how it should be done
-     */
-    DX_STUB_str("FIXME This is not right exiame how it should be done\n");
-    return This->dwIntRefCnt;
+    ULONG ref = 0;
+
+    AcquireDDThreadLock();
+
+    _SEH2_TRY
+    {
+        This->dwIntRefCnt--;
+        ref = This->dwIntRefCnt;
+        if(!ref)
+        {
+            DxHeapMemFree(This);
+        }
+    }
+    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    {
+    }
+    _SEH2_END
+
+    ReleaseDDThreadLock();
+
+    return ref;
 }
 
 

Modified: branches/reactx/reactos/dll/directx/ddraw/ddraw.rbuild
URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddraw/ddraw.rbuild?rev=43812&r1=43811&r2=43812&view=diff
==============================================================================
--- branches/reactx/reactos/dll/directx/ddraw/ddraw.rbuild [iso-8859-1] (original)
+++ branches/reactx/reactos/dll/directx/ddraw/ddraw.rbuild [iso-8859-1] Wed Oct 28 16:22:45 2009
@@ -9,7 +9,7 @@
 	<library>d3d8thk</library>
 	<library>dxguid</library>
 	<library>ole32</library>
-	<library>user32</library>
+	<library>uuid</library>
 	<library>advapi32</library>
 	<library>pseh</library>
 
@@ -50,6 +50,7 @@
 		<file>kernel_stubs.c</file>
 	</directory>
 	<directory name="Palette">
+		<file>palette_main.c</file>
 		<file>palette_stubs.c</file>
 	</directory>
 	<directory name="Videoport">




More information about the Ros-diffs mailing list