Never, Never do if (FALSE) it will make dead code. activate dead code after DrFreds...
authorMagnus Olsen <magnus@greatlord.com>
Fri, 4 Nov 2005 16:26:13 +0000 (16:26 +0000)
committerMagnus Olsen <magnus@greatlord.com>
Fri, 4 Nov 2005 16:26:13 +0000 (16:26 +0000)
svn path=/trunk/; revision=18996

reactos/lib/ddraw/main/ddraw_main.c
reactos/lib/ddraw/rosdraw.h

index 88401bd..e9bb331 100644 (file)
@@ -16,13 +16,14 @@ HRESULT WINAPI Main_DirectDraw_Initialize (LPDIRECTDRAW7 iface, LPGUID lpGUID)
     IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
     HRESULT ret;
 
-    // this if it is not called by DirectDrawCreate
-    if(FALSE)
+       if (This->InitializeDraw == TRUE)
         return DDERR_ALREADYINITIALIZED;
 
-    // save the parameter
-    This->lpGUID = lpGUID;
+    This->InitializeDraw = TRUE;
 
+   
+
+           
     // get the HDC
     This->hdc = GetWindowDC(GetDesktopWindow());
     This->Height = GetDeviceCaps(This->hdc, VERTRES);
index 685a0f6..6fa7f37 100644 (file)
@@ -28,7 +28,8 @@ typedef struct
        HDC hdc;
        int Height, Width, Bpp;
 
-       GUID* lpGUID;
+       GUID InGUID;
+       BOOL InitializeDraw;
 
 } IDirectDrawImpl;