From e46a5994cf574f6eebe561c2b6d42f9adb2ccce1 Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Fri, 22 Jun 2007 15:11:59 +0000 Subject: [PATCH] Fixing smaller bugs, like save the internal surface list, document up some members what they do svn path=/trunk/; revision=27262 --- reactos/dll/directx/ddraw/Surface/createsurface.c | 5 +++-- reactos/dll/directx/ddraw/ddraw_structures.txt | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/reactos/dll/directx/ddraw/Surface/createsurface.c b/reactos/dll/directx/ddraw/Surface/createsurface.c index 49d4337c171..dbff95aae34 100644 --- a/reactos/dll/directx/ddraw/Surface/createsurface.c +++ b/reactos/dll/directx/ddraw/Surface/createsurface.c @@ -187,11 +187,12 @@ Internal_CreateSurface( LPDDRAWI_DIRECTDRAW_INT pDDraw, LPDDSURFACEDESC2 pDDSD, 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 */ /* FIXME bIsDifferentPixelFormat being set to true or false with automatic detcitons */ @@ -231,7 +232,7 @@ Internal_CreateSurface( LPDDRAWI_DIRECTDRAW_INT pDDraw, LPDDSURFACEDESC2 pDDSD, return mDdCreateSurface.ddRVal; } - *ppSurf = &slist_int[0]->lpVtbl; + *ppSurf = (LPDIRECTDRAWSURFACE7) &slist_int[0]->lpVtbl; return DD_OK; } diff --git a/reactos/dll/directx/ddraw/ddraw_structures.txt b/reactos/dll/directx/ddraw/ddraw_structures.txt index bc57cde9c51..0f896ddda4b 100644 --- a/reactos/dll/directx/ddraw/ddraw_structures.txt +++ b/reactos/dll/directx/ddraw/ddraw_structures.txt @@ -37,7 +37,7 @@ typedef struct _DDRAWI_DIRECTDRAW_LCL { 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 @@ typedef struct _DDRAWI_DIRECTDRAW_LCL { 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 @@ typedef struct _DDRAWI_DIRECTDRAW_GBL { 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 @@ typedef struct _DDRAWI_DIRECTDRAW_GBL { 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;