[ros-diffs] [greatlrd] 27262: Fixing smaller bugs, like save the internal surface list, document up some members what they do

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Fri Jun 22 17:11:59 CEST 2007


Author: greatlrd
Date: Fri Jun 22 19:11:59 2007
New Revision: 27262

URL: http://svn.reactos.org/svn/reactos?rev=27262&view=rev
Log:
Fixing smaller bugs, like save the internal surface list, document up some members what they do

Modified:
    trunk/reactos/dll/directx/ddraw/Surface/createsurface.c
    trunk/reactos/dll/directx/ddraw/ddraw_structures.txt

Modified: trunk/reactos/dll/directx/ddraw/Surface/createsurface.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Surface/createsurface.c?rev=27262&r1=27261&r2=27262&view=diff
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Surface/createsurface.c (original)
+++ trunk/reactos/dll/directx/ddraw/Surface/createsurface.c Fri Jun 22 19:11:59 2007
@@ -187,10 +187,11 @@
         ThisSurfLcl->dwProcessId = GetCurrentProcessId();
 
         /* FIXME the lpLnk */
-        /* FIXME the ref counter */
 
         Main_DDrawSurface_AddRef((LPDIRECTDRAWSURFACE7)ThisSurfInt);
     }
+
+    pDDraw->lpLcl->lpGbl->dsList = (LPDDRAWI_DDRAWSURFACE_INT) slist_int;
 
     /* Fixme call on DdCanCreate then on DdCreateSurface createsurface data here */
 
@@ -231,7 +232,7 @@
         return mDdCreateSurface.ddRVal;
     }
 
-    *ppSurf = &slist_int[0]->lpVtbl;
+    *ppSurf = (LPDIRECTDRAWSURFACE7) &slist_int[0]->lpVtbl;
     return DD_OK;
 }
 

Modified: trunk/reactos/dll/directx/ddraw/ddraw_structures.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/ddraw_structures.txt?rev=27262&r1=27261&r2=27262&view=diff
==============================================================================
--- trunk/reactos/dll/directx/ddraw/ddraw_structures.txt (original)
+++ trunk/reactos/dll/directx/ddraw/ddraw_structures.txt Fri Jun 22 19:11:59 2007
@@ -37,7 +37,7 @@
   ULONG_PTR  hWnd;
   ULONG_PTR  hDC;                       // create HDC and save it to this pointer
   DWORD  dwErrorMode;
-  LPDDRAWI_DDRAWSURFACE_INT  lpPrimary;
+  LPDDRAWI_DDRAWSURFACE_INT  lpPrimary;  // The primary surface
   LPDDRAWI_DDRAWSURFACE_INT  lpCB;
   DWORD   dwPreferredMode;
   HINSTANCE  hD3DInstance;
@@ -49,7 +49,7 @@
   DWORD   dwHotTracking;
   DWORD   dwIMEState;
   ULONG_PTR  hWndPopup;
-  ULONG_PTR  hDD;
+  ULONG_PTR  hDD;                      // from Gdientry1 copy the _DDRAWI_DIRECTDRAW_GBL hDD after startup then copy this back each time we need hDD
   ULONG_PTR  hGammaCalibrator;
   LPDDGAMMACALIBRATORPROC  lpGammaCalibrator;
 } DDRAWI_DIRECTDRAW_LCL;
@@ -62,20 +62,20 @@
   DWORD  dwInternal1;
   DWORD  dwUnused1[9];
   LPDDHAL_CALLBACKS  lpDDCBtmp;
-  LPDDRAWI_DDRAWSURFACE_INT  dsList;
+  LPDDRAWI_DDRAWSURFACE_INT  dsList;   // list of all created directdraw surface, it is a pointer list    
   LPDDRAWI_DDRAWPALETTE_INT  palList;
   LPDDRAWI_DDRAWCLIPPER_INT  clipperList;
   LPDDRAWI_DIRECTDRAW_GBL  lp16DD;    // pointer to it self (DDRAWI_DIRECTDRAW_GBL)
   DWORD  dwMaxOverlays;
   DWORD  dwCurrOverlays;
-  DWORD  dwMonitorFrequency;
+  DWORD  dwMonitorFrequency;         // current mointor freq, (nivida always set this to 0, it is a bug in nvida drv)
   DDCORECAPS  ddHELCaps;
   DWORD  dwUnused2[50];
   DDCOLORKEY  ddckCKDestOverlay;
   DDCOLORKEY  ddckCKSrcOverlay;
   VIDMEMINFO  vmiData;
   LPVOID  lpDriverHandle;
-  LPDDRAWI_DIRECTDRAW_LCL  lpExclusiveOwner;
+  LPDDRAWI_DIRECTDRAW_LCL  lpExclusiveOwner;  // which local directdraw comobject is in Exclusive mode and own this  
   DWORD  dwModeIndex;
   DWORD  dwModeIndexOrig;
   DWORD  dwNumFourCC;
@@ -118,7 +118,7 @@
   ULONG_PTR  lpD3DExtendedCaps;
   DWORD  dwDOSBoxEvent;
   RECT  rectDesktop;
-  char  cDriverName[MAX_DRIVER_NAME];
+  char  cDriverName[MAX_DRIVER_NAME];   // driver name, if we send in CreateDirectDraw(NULL, ...) this will be fill in the name "display" 
   ULONG_PTR   lpD3DHALCallbacks3;
   DWORD  dwNumZPixelFormats;
   LPDDPIXELFORMAT  lpZPixelFormats;




More information about the Ros-diffs mailing list