GetFreeSpace is here since 1993 and returns crazy values. Let's have win64/win32 cases only.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-12-27 20:17:44 +00:00
parent 51496782d1
commit 2b7295c904

View File

@@ -1015,15 +1015,13 @@ wxMemorySize wxGetFreeMemory()
#if defined(__WIN64__) #if defined(__WIN64__)
MEMORYSTATUSEX memStatex; MEMORYSTATUSEX memStatex;
statex.dwLength = sizeof (statex); statex.dwLength = sizeof (statex);
GlobalMemoryStatusEx (&statex); ::GlobalMemoryStatusEx (&statex);
return (wxMemorySize)memStatus.ullAvailPhys; return (wxMemorySize)memStatus.ullAvailPhys;
#elif defined(__WIN32__) && !defined(__BORLANDC__) #else /* if defined(__WIN32__) */
MEMORYSTATUS memStatus; MEMORYSTATUS memStatus;
memStatus.dwLength = sizeof(MEMORYSTATUS); memStatus.dwLength = sizeof(MEMORYSTATUS);
GlobalMemoryStatus(&memStatus); ::GlobalMemoryStatus(&memStatus);
return (wxMemorySize)memStatus.dwAvailPhys; return (wxMemorySize)memStatus.dwAvailPhys;
#else
return (wxMemorySize)GetFreeSpace(0);
#endif #endif
} }