[ros-diffs] [greatlrd] 25008: stubed Main_DirectDraw_SetCooperativeLevel it need be rewrite

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Thu Nov 30 22:43:08 CET 2006


Author: greatlrd
Date: Fri Dec  1 00:43:07 2006
New Revision: 25008

URL: http://svn.reactos.org/svn/reactos?rev=25008&view=rev
Log:
stubed Main_DirectDraw_SetCooperativeLevel 
it need be rewrite

Modified:
    trunk/reactos/dll/directx/ddraw/main/ddraw_main.c

Modified: trunk/reactos/dll/directx/ddraw/main/ddraw_main.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/main/ddraw_main.c?rev=25008&r1=25007&r2=25008&view=diff
==============================================================================
--- trunk/reactos/dll/directx/ddraw/main/ddraw_main.c (original)
+++ trunk/reactos/dll/directx/ddraw/main/ddraw_main.c Fri Dec  1 00:43:07 2006
@@ -207,11 +207,15 @@
         return CLASS_E_NOAGGREGATION; 
 	}
 
+	DX_STUB_str("ok pUnkOuter == NULL");
+
     if (sizeof(DDSURFACEDESC2)!=pDDSD->dwSize && sizeof(DDSURFACEDESC)!=pDDSD->dwSize)
 	{
         return DDERR_UNSUPPORTED;
 	}
     
+	DX_STUB_str("ok pDDSD->dwSize ok");
+
     That = (LPDDRAWI_DDRAWSURFACE_INT)DxHeapMemAlloc(sizeof(DDRAWI_DDRAWSURFACE_INT));
     
     if (That == NULL) 
@@ -219,12 +223,22 @@
         return E_OUTOFMEMORY;
 	}
 
+	DX_STUB_str("That got memory");
+
     	
     That->lpVtbl = &DirectDrawSurface7_Vtable;
+
+	DX_STUB_str("That->lpVtbl ok");
+
 	*ppSurf = (LPDIRECTDRAWSURFACE7)That;
+
+	DX_STUB_str("*ppSurf ok");
 	
 	That->lpLcl->lpGbl = &ddSurfGbl;
+	DX_STUB_str("ddSurfGbl ok");
+
 	That->lpLcl->lpGbl->lpDD = &ddgbl;
+	DX_STUB_str("crash one line below : why ? to tried figout lpDD ok");
 
 	Main_DDrawSurface_AddRef((LPDIRECTDRAWSURFACE7)That);
 	
@@ -248,17 +262,22 @@
         pDDSD->ddsCaps.dwCaps = DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY;
     }
 
+	
     if (pDDSD->ddsCaps.dwCaps & DDSCAPS_ALLOCONLOAD)
     {
         /* If the surface is of the 'alloconload' type, ignore the LPSURFACE field */
         pDDSD->dwFlags &= ~DDSD_LPSURFACE;
     }
 
+	DX_STUB_str("pDDSD->ddsCaps.dwCaps ok");
+
     if ((pDDSD->dwFlags & DDSD_LPSURFACE) && (pDDSD->lpSurface == NULL))
     {
         /* Frank Herbert's Dune specifies a null pointer for the surface, ignore the LPSURFACE field */       
         pDDSD->dwFlags &= ~DDSD_LPSURFACE;
     }
+
+	DX_STUB_str("pDDSD->dwFlags ok");
 
 	/* own code now */
 
@@ -292,6 +311,7 @@
              DX_STUB_str( "Can not create offscreenplain surface");
     }
   
+	DX_STUB_str("DDERR_INVALIDSURFACETYPE");
     return DDERR_INVALIDSURFACETYPE;  
    
 }
@@ -726,48 +746,49 @@
 
     
 
-    LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface;
-    DDHAL_SETEXCLUSIVEMODEDATA SetExclusiveMode;
-
-	DX_WINDBG_trace();
-    
-	
-    // check the parameters
-    if ((HWND)This->lpLcl->lpGbl->lpExclusiveOwner->hWnd  == hwnd)
-        return DD_OK;
-    
-   
-
-    if ((cooplevel&DDSCL_EXCLUSIVE) && !(cooplevel&DDSCL_FULLSCREEN))
-        return DDERR_INVALIDPARAMS;
-
-    if (cooplevel&DDSCL_NORMAL && cooplevel&DDSCL_FULLSCREEN)
-        return DDERR_INVALIDPARAMS;
-
-    // set the data
-    This->lpLcl->lpGbl->lpExclusiveOwner->hWnd = (ULONG_PTR) hwnd;
-    This->lpLcl->lpGbl->lpExclusiveOwner->hDC  = (ULONG_PTR)GetDC(hwnd);
-
-	
-	/* FIXME : fill the  mDDrawGlobal.lpExclusiveOwner->dwLocalFlags right */
-	//mDDrawGlobal.lpExclusiveOwner->dwLocalFlags
-
-
-    SetExclusiveMode.ddRVal = DDERR_NOTPALETTIZED;
-	if ((This->lpLcl->lpGbl->lpDDCBtmp->cbDDCallbacks.dwFlags & DDHAL_CB32_SETEXCLUSIVEMODE)) 
-    {       
-       
-        SetExclusiveMode.SetExclusiveMode = This->lpLcl->lpGbl->lpDDCBtmp->cbDDCallbacks.SetExclusiveMode;   
-		SetExclusiveMode.lpDD = This->lpLcl->lpGbl;       
-        SetExclusiveMode.dwEnterExcl = cooplevel;
-
-		if (SetExclusiveMode.SetExclusiveMode(&SetExclusiveMode) != DDHAL_DRIVER_HANDLED)
-        {
-            return DDERR_NODRIVERSUPPORT;
-        }
-    }
-                   
-    return SetExclusiveMode.ddRVal;               
+ //   LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface;
+ //   DDHAL_SETEXCLUSIVEMODEDATA SetExclusiveMode;
+
+	//DX_WINDBG_trace();
+ //   
+	//
+ //   // check the parameters
+ //   if ((HWND)This->lpLcl->lpGbl->lpExclusiveOwner->hWnd  == hwnd)
+ //       return DD_OK;
+ //   
+ //  
+
+ //   if ((cooplevel&DDSCL_EXCLUSIVE) && !(cooplevel&DDSCL_FULLSCREEN))
+ //       return DDERR_INVALIDPARAMS;
+
+ //   if (cooplevel&DDSCL_NORMAL && cooplevel&DDSCL_FULLSCREEN)
+ //       return DDERR_INVALIDPARAMS;
+
+ //   // set the data
+ //   This->lpLcl->lpGbl->lpExclusiveOwner->hWnd = (ULONG_PTR) hwnd;
+ //   This->lpLcl->lpGbl->lpExclusiveOwner->hDC  = (ULONG_PTR)GetDC(hwnd);
+
+	//
+	///* FIXME : fill the  mDDrawGlobal.lpExclusiveOwner->dwLocalFlags right */
+	////mDDrawGlobal.lpExclusiveOwner->dwLocalFlags
+
+
+ //   SetExclusiveMode.ddRVal = DDERR_NOTPALETTIZED;
+	//if ((This->lpLcl->lpGbl->lpDDCBtmp->cbDDCallbacks.dwFlags & DDHAL_CB32_SETEXCLUSIVEMODE)) 
+ //   {       
+ //      
+ //       SetExclusiveMode.SetExclusiveMode = This->lpLcl->lpGbl->lpDDCBtmp->cbDDCallbacks.SetExclusiveMode;   
+	//	SetExclusiveMode.lpDD = This->lpLcl->lpGbl;       
+ //       SetExclusiveMode.dwEnterExcl = cooplevel;
+
+	//	if (SetExclusiveMode.SetExclusiveMode(&SetExclusiveMode) != DDHAL_DRIVER_HANDLED)
+ //       {
+ //           return DDERR_NODRIVERSUPPORT;
+ //       }
+ //   }
+ //                  
+ //   return SetExclusiveMode.ddRVal;  
+	DX_STUB_DD_OK;
 }
 
 /*




More information about the Ros-diffs mailing list