Author: greatlrd
Date: Sun Aug 6 14:28:08 2006
New Revision: 23494
URL:
http://svn.reactos.org/svn/reactos?rev=23494&view=rev
Log:
fixing some bugs in DirectDraw_GetAvailableVidMem
Modified:
trunk/reactos/dll/directx/ddraw/main/ddraw_main.c
Modified: trunk/reactos/dll/directx/ddraw/main/ddraw_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/main/ddr…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/main/ddraw_main.c (original)
+++ trunk/reactos/dll/directx/ddraw/main/ddraw_main.c Sun Aug 6 14:28:08 2006
@@ -1330,15 +1330,20 @@
mem.lpDD = &This->mDDrawGlobal;
mem.ddRVal = DDERR_NOTPALETTIZED;
+ mem.lpDD = This->mDDrawLocal.lpGbl;
+ mem.DDSCaps.dwCaps = ddscaps->dwCaps;
+ mem.ddsCapsEx.dwCaps2 = ddscaps->dwCaps2;
+ mem.ddsCapsEx.dwCaps3 = ddscaps->dwCaps3;
+ mem.ddsCapsEx.dwCaps4 = ddscaps->dwCaps4;
+
if
(This->mDDrawGlobal.lpDDCBtmp->HALDDMiscellaneous.GetAvailDriverMemory(&mem) ==
DDHAL_DRIVER_HANDLED);
{
- ddscaps->dwCaps = mem.DDSCaps.dwCaps;
- ddscaps->dwCaps2 = mem.ddsCapsEx.dwCaps2;
- ddscaps->dwCaps3 = mem.ddsCapsEx.dwCaps3;
- ddscaps->dwCaps4 = mem.ddsCapsEx.dwCaps4;
- *total = mem.dwTotal;
+ if (total !=NULL)
+ {
+ *total = mem.dwTotal;
+ }
+
*free = mem.dwFree;
-
return mem.ddRVal;
}