Never, Never do if (FALSE) it will make dead code. activate dead code
after DrFreds bug.
Modified: trunk/reactos/lib/ddraw/main/ddraw_main.c
Modified: trunk/reactos/lib/ddraw/rosdraw.h
_____
Modified: trunk/reactos/lib/ddraw/main/ddraw_main.c
--- trunk/reactos/lib/ddraw/main/ddraw_main.c 2005-11-04 16:02:23 UTC
(rev 18995)
+++ trunk/reactos/lib/ddraw/main/ddraw_main.c 2005-11-04 16:26:13 UTC
(rev 18996)
@@ -16,13 +16,14 @@
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);
_____
Modified: trunk/reactos/lib/ddraw/rosdraw.h
--- trunk/reactos/lib/ddraw/rosdraw.h 2005-11-04 16:02:23 UTC (rev
18995)
+++ trunk/reactos/lib/ddraw/rosdraw.h 2005-11-04 16:26:13 UTC (rev
18996)
@@ -28,7 +28,8 @@
HDC hdc;
int Height, Width, Bpp;
- GUID* lpGUID;
+ GUID InGUID;
+ BOOL InitializeDraw;
} IDirectDrawImpl;
Show replies by date