(Windows) Free memory is now queried with GlobalMemoryStatus, so GrafX2 can be used on ...DOS with HX extender.

The result now tops at 4Gb free physical. Previously it would wrap, causing problems if you were extremely unlucky.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@629 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud 2009-02-14 20:22:01 +00:00
parent d704c4f425
commit 108b887f07
2 changed files with 4 additions and 4 deletions

View File

@ -643,10 +643,10 @@ unsigned long Memoire_libre(void)
// ever becomes full and you're still saying there are 10MB free here, the
// program will crash without saving any picture backup ! You've been warned...
#if defined(__WIN32__)
MEMORYSTATUSEX mstt;
mstt.dwLength = sizeof(MEMORYSTATUSEX);
GlobalMemoryStatusEx(&mstt);
return mstt.ullAvailPhys;
MEMORYSTATUS mstt;
mstt.dwLength = sizeof(MEMORYSTATUS);
GlobalMemoryStatus(&mstt);
return mstt.dwAvailPhys;
#elif defined(__macosx__) || defined(__FreeBSD__)
int mib[2];
int maxmem;

BIN
gfx2.cfg

Binary file not shown.