* Made it possible to include both d3d9types.h and ddrawgdi.h at the same time
[reactos.git] / reactos / dll / directx / ddraw / startup.c
index 89f900f..ef660ef 100644 (file)
@@ -9,7 +9,6 @@
  */
 
 #include "rosdraw.h"
-#include "ddrawgdi.h"
 
 DDRAWI_DIRECTDRAW_GBL ddgbl;
 DDRAWI_DDRAWSURFACE_GBL ddSurfGbl;
@@ -219,8 +218,8 @@ StartDirectDraw(LPDIRECTDRAW iface, LPGUID lpGuid, BOOL reenable)
         }
 
     }
-    /* Windows handler are by set of SetCooperLevel 
-     * so do not set it 
+    /* Windows handler are by set of SetCooperLevel
+     * so do not set it
      */
 
     if (reenable == FALSE)
@@ -333,15 +332,15 @@ StartDirectDraw(LPDIRECTDRAW iface, LPGUID lpGuid, BOOL reenable)
     This->lpLcl->lpDDCB = This->lpLcl->lpGbl->lpDDCBtmp;
     This->lpLcl->hDD = ddgbl.hDD;
 
-    ddgbl.rectDevice.bottom = 0;
-    ddgbl.rectDevice.left= 0;
+    ddgbl.rectDevice.top = 0;
+    ddgbl.rectDevice.left = 0;
     ddgbl.rectDevice.right = ddgbl.vmiData.dwDisplayWidth;
-    ddgbl.rectDevice.right = ddgbl.vmiData.dwDisplayHeight;
+    ddgbl.rectDevice.bottom = ddgbl.vmiData.dwDisplayHeight;
 
-    ddgbl.rectDesktop.bottom = 0;
-    ddgbl.rectDesktop.left= 0;
+    ddgbl.rectDesktop.top = 0;
+    ddgbl.rectDesktop.left = 0;
     ddgbl.rectDesktop.right = ddgbl.vmiData.dwDisplayWidth;
-    ddgbl.rectDesktop.right = ddgbl.vmiData.dwDisplayHeight;
+    ddgbl.rectDesktop.bottom = ddgbl.vmiData.dwDisplayHeight;
 
     ddgbl.dwMonitorFrequency = GetDeviceCaps(GetWindowDC(NULL),VREFRESH);
     ddgbl.lpModeInfo->dwWidth      = ddgbl.vmiData.dwDisplayWidth;
@@ -504,7 +503,7 @@ StartDirectDrawHal(LPDIRECTDRAW iface, BOOL reenable)
     {
       DxHeapMemFree(This->lpLcl->lpGbl->lpModeInfo);
       DxHeapMemFree(ddgbl.lpDDCBtmp);
-      // FIXME Close DX fristcall and second call
+      // FIXME Close DX first and second call
       return DD_FALSE;
     }
 
@@ -516,13 +515,13 @@ StartDirectDrawHal(LPDIRECTDRAW iface, BOOL reenable)
 
     if (mHALInfo.ddCaps.dwNumFourCCCodes > 0 )
     {
-      
+
         DxHeapMemAlloc(mpFourCC, sizeof(DWORD) * (mHALInfo.ddCaps.dwNumFourCCCodes + 2));
 
         if (mpFourCC == NULL)
         {
             DxHeapMemFree(ddgbl.lpDDCBtmp);
-            // FIXME Close DX fristcall and second call
+            // FIXME Close DX first and second call
             return DD_FALSE;
         }
     }
@@ -544,7 +543,7 @@ StartDirectDrawHal(LPDIRECTDRAW iface, BOOL reenable)
         {
             DxHeapMemFree(mpFourCC);
             DxHeapMemFree(ddgbl.lpDDCBtmp);
-            // FIXME Close DX fristcall and second call
+            // FIXME Close DX first and second call
         }
     }
 
@@ -572,12 +571,12 @@ StartDirectDrawHal(LPDIRECTDRAW iface, BOOL reenable)
         DxHeapMemFree(mpFourCC);
         DxHeapMemFree(mpTextures);
         DxHeapMemFree(ddgbl.lpDDCBtmp);
-        // FIXME Close DX fristcall and second call
+        // FIXME Close DX first and second call
         return DD_FALSE;
     }
 
     memcpy(&ddgbl.vmiData, &mHALInfo.vmiData,sizeof(VIDMEMINFO));
-    
+
 
     memcpy(&ddgbl.ddCaps,  &mHALInfo.ddCaps,sizeof(DDCORECAPS));
 
@@ -593,7 +592,7 @@ StartDirectDrawHal(LPDIRECTDRAW iface, BOOL reenable)
 
     /* FIXME D3D setup mD3dCallbacks and mD3dDriverData */
 
-    
+
 
 
     if (mHALInfo.dwFlags & DDHALINFO_GETDRIVERINFOSET)
@@ -615,8 +614,8 @@ StartDirectDrawHal(LPDIRECTDRAW iface, BOOL reenable)
         RtlZeroMemory(&DdGetDriverInfo, sizeof(DDHAL_GETDRIVERINFODATA));
         DdGetDriverInfo.dwSize = sizeof (DDHAL_GETDRIVERINFODATA);
         DdGetDriverInfo.guidInfo = GUID_Miscellaneous2Callbacks;
-        
-        /* FIXME 
+
+        /* FIXME
         DdGetDriverInfo.lpvData = (PVOID)&ddgbl.lpDDCBtmp->HALDDMiscellaneous;
         DdGetDriverInfo.dwExpectedSize = sizeof (DDHAL_DDMISCELLANEOUS2CALLBACKS);
 
@@ -628,7 +627,7 @@ StartDirectDrawHal(LPDIRECTDRAW iface, BOOL reenable)
             // FIXME Close DX fristcall and second call
             return DD_FALSE;
         }
-        DD_MISCELLANEOUS2CALLBACKS 
+        DD_MISCELLANEOUS2CALLBACKS
         {
             DWORD                dwSize;
             DWORD                dwFlags;