Author: greatlrd
Date: Thu Apr 13 15:03:19 2006
New Revision: 21578
URL:
http://svn.reactos.ru/svn/reactos?rev=21578&view=rev
Log:
one more redisg adding a member that tells whih destions it is. it work pretty well.
Modified:
trunk/reactos/dll/directx/ddraw/hal/surface_hal.c
trunk/reactos/dll/directx/ddraw/main/ddraw_main.c
trunk/reactos/dll/directx/ddraw/rosdraw.h
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 Thu Apr 13 15:03:19 2006
@@ -67,7 +67,7 @@
mDdBlt.lpDD = &This->Owner->mDDrawGlobal;
mDdBlt.Blt = This->Owner->mCallbacks.HALDDSurface.Blt;
- mDdBlt.lpDDDestSurface = This->Owner->mpPrimaryLocals[0];
+ mDdBlt.lpDDDestSurface = This->Surf->mpInUseSurfaceLocals[0];
mDdBlt.dwFlags = dwFlags;
@@ -109,7 +109,7 @@
Lock.ddRVal = DDERR_NOTPALETTIZED;
Lock.Lock = This->Owner->mCallbacks.HALDDSurface.Lock;
Lock.dwFlags = flags;
- Lock.lpDDSurface = &This->Owner->mPrimaryLocal;
+ Lock.lpDDSurface = This->Surf->mpInUseSurfaceLocals[0];
Lock.lpDD = &This->Owner->mDDrawGlobal;
Lock.lpSurfData = NULL;
@@ -160,7 +160,7 @@
DDHAL_UNLOCKDATA unLock;
unLock.ddRVal = DDERR_NOTPALETTIZED;
unLock.lpDD = &This->Owner->mDDrawGlobal;
- unLock.lpDDSurface = &This->Owner->mPrimaryLocal;
+ unLock.lpDDSurface = This->Surf->mpInUseSurfaceLocals[0];
unLock.Unlock = This->Owner->mCallbacks.HALDDSurface.Unlock;
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 Thu Apr 13 15:03:19 2006
@@ -577,6 +577,7 @@
That->Owner->mddsdPrimary.dwAlphaBitDepth =
This->mDDrawGlobal.vmiData.ddpfDisplay.dwAlphaBitDepth;
}
+ That->Surf->mpInUseSurfaceLocals[0] =
&That->Owner->mPrimaryLocal;
return DD_OK;
}
@@ -586,18 +587,23 @@
OutputDebugStringA("Create DDSCAPS_OVERLAY\n");
memset(&That->Surf->mddsdOverlay, 0, sizeof(DDSURFACEDESC));
+ memcpy(&That->Surf->mddsdOverlay, pDDSD, sizeof(DDSURFACEDESC));
That->Surf->mddsdOverlay.dwSize = sizeof(DDSURFACEDESC);
That->Surf->mddsdOverlay.dwFlags = DDSD_CAPS | DDSD_PIXELFORMAT |
DDSD_BACKBUFFERCOUNT | DDSD_WIDTH | DDSD_HEIGHT;
That->Surf->mddsdOverlay.ddsCaps.dwCaps = DDSCAPS_OVERLAY |
DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM | DDSCAPS_COMPLEX | DDSCAPS_FLIP;
+
+
+
//
- That->Surf->mddsdOverlay.dwWidth = 100; //pels;
- That->Surf->mddsdOverlay.dwHeight = 100; // lines;
+
+ That->Surf->mddsdOverlay.dwWidth = pDDSD->dwWidth; //pels;
+ That->Surf->mddsdOverlay.dwHeight = pDDSD->dwHeight; // lines;
That->Surf->mddsdOverlay.dwBackBufferCount = 1; //cBuffers;
That->Surf->mddsdOverlay.ddpfPixelFormat.dwSize =
sizeof(DDPIXELFORMAT);
That->Surf->mddsdOverlay.ddpfPixelFormat.dwFlags = DDPF_RGB;
That->Surf->mddsdOverlay.ddpfPixelFormat.dwRGBBitCount = 32;
-//
+//
//
DDHAL_CANCREATESURFACEDATA mDdCanCreateSurface;
mDdCanCreateSurface.lpDD = &This->mDDrawGlobal;
@@ -712,6 +718,8 @@
return mDdUpdateOverlay.ddRVal;
}
+ That->Surf->mpInUseSurfaceLocals[0] =
That->Surf->mpOverlayLocals[0];
+ //That->Surf->mpInUseSurfaceLocals[0] =
&That->Owner->mPrimaryLocal;
return DD_OK;
}
else if (pDDSD->ddsCaps.dwCaps & DDSCAPS_BACKBUFFER)
Modified: trunk/reactos/dll/directx/ddraw/rosdraw.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/directx/ddraw/rosdraw.h…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/rosdraw.h (original)
+++ trunk/reactos/dll/directx/ddraw/rosdraw.h Thu Apr 13 15:03:19 2006
@@ -98,6 +98,8 @@
typedef struct
{
+ DDRAWI_DDRAWSURFACE_LCL *mpInUseSurfaceLocals[1];
+
DDRAWI_DDRAWSURFACE_GBL mSurfGlobal;
DDRAWI_DDRAWSURFACE_MORE mSurfMore;
DDRAWI_DDRAWSURFACE_LCL mSurfLocal;