Use the info we got from callback for the res in createsurface
Modified: trunk/reactos/lib/ddraw/main/surface_main.c
_____
Modified: trunk/reactos/lib/ddraw/main/surface_main.c
--- trunk/reactos/lib/ddraw/main/surface_main.c 2005-10-31 18:56:44 UTC
(rev 18912)
+++ trunk/reactos/lib/ddraw/main/surface_main.c 2005-10-31 19:02:09 UTC
(rev 18913)
@@ -22,7 +22,7 @@
return DDERR_INVALIDPARAMS;
This->owner = (IDirectDrawImpl*)pDD;
-
+
if (This->owner->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags &
DDHAL_CB32_CANCREATESURFACE)
{
/* can the driver create the surface */
@@ -41,10 +41,13 @@
/* surface global struct */
memset(&This->Global, 0, sizeof(DDRAWI_DDRAWSURFACE_GBL));
This->Global.lpDD = &This->owner->DirectDrawGlobal;
- This->Global.wHeight = This->owner->Height;
- This->Global.wWidth = This->owner->Width;
- This->Global.dwLinearSize = This->Global.wWidth *
This->owner->Bpp/8;
+ This->Global.wHeight =
This->owner->DirectDrawGlobal.vmiData.dwDisplayHeight;
+ This->Global.wWidth =
This->owner->DirectDrawGlobal.vmiData.dwDisplayWidth;
+ This->Global.dwLinearSize =
This->owner->DirectDrawGlobal.vmiData.lDisplayPitch;
+
+
+
/* surface more struct */
memset(&This->More, 0, sizeof(DDRAWI_DDRAWSURFACE_MORE));
This->More.dwSize = sizeof(DDRAWI_DDRAWSURFACE_MORE);
Show replies by date