kernel32: Truncate the reported by GlobalMemoryStatus() memory limits for Win9x versions too.

Dmitry Timoshkov dmitry at codeweavers.com
Wed Oct 6 05:05:01 CDT 2010


When Wine is confugured to report win9x version, Quickbooks 2003 refuses
to start up, claiming insufficient free memory. This patch works around
that problem.
---
 dlls/kernel32/heap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/kernel32/heap.c b/dlls/kernel32/heap.c
index e20f8fb..7be9172 100644
--- a/dlls/kernel32/heap.c
+++ b/dlls/kernel32/heap.c
@@ -1325,7 +1325,7 @@ VOID WINAPI GlobalMemoryStatus( LPMEMORYSTATUS lpBuffer )
     osver.dwOSVersionInfoSize = sizeof(osver);
     GetVersionExW(&osver);
 
-    if ( osver.dwMajorVersion >= 5 )
+    if ( osver.dwMajorVersion >= 5 || osver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS )
     {
         lpBuffer->dwTotalPhys = min( memstatus.ullTotalPhys, MAXDWORD );
         lpBuffer->dwAvailPhys = min( memstatus.ullAvailPhys, MAXDWORD );
-- 
1.7.0.6




More information about the wine-patches mailing list