Author: greatlrd
Date: Sun Apr 9 22:08:18 2006
New Revision: 21535
URL:
http://svn.reactos.ru/svn/reactos?rev=21535&view=rev
Log:
Fixing a bug fill in a struct it return zero info but we need that info later
Modified:
trunk/reactos/dll/directx/ddraw/hal/surface_hal.c
trunk/reactos/dll/directx/ddraw/main/ddraw_main.c
Modified: trunk/reactos/dll/directx/ddraw/hal/surface_hal.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/directx/ddraw/hal/surfa…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/hal/surface_hal.c (original)
+++ trunk/reactos/dll/directx/ddraw/hal/surface_hal.c Sun Apr 9 22:08:18 2006
@@ -94,7 +94,55 @@
return mDdCreateSurface.ddRVal;
}
-
+
+ /* FIXME fill in this if they are avali
+ DDSD_BACKBUFFERCOUNT
+ DDSD_CKDESTBLT
+ DDSD_CKDESTOVERLAY
+ DDSD_CKSRCBLT
+ DDSD_CKSRCOVERLAY
+ DDSD_LINEARSIZE
+ DDSD_LPSURFACE
+ DDSD_MIPMAPCOUNT
+ DDSD_ZBUFFERBITDEPTH
+ */
+
+ That->Surf->mddsdPrimary.dwFlags = DDSD_CAPS + DDSD_PIXELFORMAT;
+
RtlCopyMemory(&That->Surf->mddsdPrimary.ddpfPixelFormat,&This->mDDrawGlobal.vmiData.ddpfDisplay,sizeof(DDPIXELFORMAT));
+
RtlCopyMemory(&That->Surf->mddsdPrimary.ddsCaps,&This->mDDrawGlobal.ddCaps,sizeof(DDCORECAPS));
+
+
//RtlCopyMemory(&pDDSD->ddckCKDestOverlay,&This->mDDrawGlobal.ddckCKDestOverlay,sizeof(DDCOLORKEY));
+
//RtlCopyMemory(&pDDSD->ddckCKSrcOverlay,&This->mDDrawGlobal.ddckCKSrcOverlay,sizeof(DDCOLORKEY));
+
+ if (This->mDDrawGlobal.vmiData.dwDisplayHeight != 0)
+ {
+ That->Surf->mddsdPrimary.dwFlags += DDSD_HEIGHT ;
+ That->Surf->mddsdPrimary.dwHeight =
This->mDDrawGlobal.vmiData.dwDisplayHeight;
+ }
+
+ if (This->mDDrawGlobal.vmiData.dwDisplayWidth != 0)
+ {
+ That->Surf->mddsdPrimary.dwFlags += DDSD_WIDTH ;
+ That->Surf->mddsdPrimary.dwWidth =
This->mDDrawGlobal.vmiData.dwDisplayWidth;
+ }
+
+ if (This->mDDrawGlobal.vmiData.lDisplayPitch != 0)
+ {
+ That->Surf->mddsdPrimary.dwFlags += DDSD_PITCH ;
+ That->Surf->mddsdPrimary.lPitch =
This->mDDrawGlobal.vmiData.lDisplayPitch;
+ }
+
+ if ( This->mDDrawGlobal.dwMonitorFrequency != 0)
+ {
+ That->Surf->mddsdPrimary.dwFlags += DDSD_REFRESHRATE ;
+ That->Surf->mddsdPrimary.dwRefreshRate =
This->mDDrawGlobal.dwMonitorFrequency;
+ }
+
+ if (This->mDDrawGlobal.vmiData.ddpfDisplay.dwAlphaBitDepth != 0)
+ {
+ That->Surf->mddsdPrimary.dwFlags += DDSD_ALPHABITDEPTH ;
+ That->Surf->mddsdPrimary.dwAlphaBitDepth =
This->mDDrawGlobal.vmiData.ddpfDisplay.dwAlphaBitDepth;
+ }
return DD_OK;
@@ -346,6 +394,8 @@
Lock.lpDD = &This->owner->mDDrawGlobal;
Lock.lpSurfData = NULL;
+ // FIXME some how lock goes wrong;
+ return DD_FALSE;
if (This->owner->mCallbacks.HALDDSurface.Lock(&Lock)!=
DDHAL_DRIVER_HANDLED)
{
return Lock.ddRVal;
Modified: trunk/reactos/dll/directx/ddraw/main/ddraw_main.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/directx/ddraw/main/ddra…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/main/ddraw_main.c (original)
+++ trunk/reactos/dll/directx/ddraw/main/ddraw_main.c Sun Apr 9 22:08:18 2006
@@ -473,6 +473,7 @@
{
return DD_FALSE;
}
+
pDDSD->dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_PITCH | DDSD_PIXELFORMAT |
DDSD_REFRESHRATE | DDSD_WIDTH;
pDDSD->dwHeight = This->mDDrawGlobal.vmiData.dwDisplayHeight;