DXGL r84 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r83‎ | r84 | r85 >
Date:00:58, 24 January 2012
Author:admin
Status:new
Tags:
Comment:
Implement GetAvailableVidMem
Modified paths:
  • /ddraw/glDirectDraw.cpp (modified) (history)

Diff [purge]

Index: ddraw/glDirectDraw.cpp
@@ -1784,8 +1784,11 @@
17851785 }
17861786 HRESULT WINAPI glDirectDraw2::GetAvailableVidMem(LPDDSCAPS lpDDSCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree)
17871787 {
1788 - FIXME("glDirectDraw2::GetAvailableVidMem: stub\n");
1789 - ERR(DDERR_GENERIC);
 1788+ MEMORYSTATUS memstatus;
 1789+ memstatus.dwLength = sizeof(MEMORYSTATUS);
 1790+ *lpdwTotal = memstatus.dwTotalVirtual;
 1791+ *lpdwFree = memstatus.dwAvailVirtual;
 1792+ return DD_OK;
17901793 }
17911794 // DDRAW4 wrapper
17921795 glDirectDraw4::glDirectDraw4(glDirectDraw7 *gl_DD7)