Commit 70ff521a authored by Fabian Bieler's avatar Fabian Bieler Committed by Alexandre Julliard

kernel32: GlobalMemoryStatusEx: always report at least 1 byte of virtual memory…

kernel32: GlobalMemoryStatusEx: always report at least 1 byte of virtual memory even if none is available.
parent e1c6c97f
......@@ -1312,6 +1312,13 @@ BOOL WINAPI GlobalMemoryStatusEx( LPMEMORYSTATUSEX lpmemex )
lpmemex->ullTotalPageFile += lpmemex->ullTotalPhys;
lpmemex->ullAvailPageFile += lpmemex->ullAvailPhys;
/* Titan Quest refuses to run if TotalPageFile <= ullTotalPhys */
if(lpmemex->ullTotalPageFile == lpmemex->ullTotalPhys)
{
lpmemex->ullTotalPhys -= 1;
lpmemex->ullAvailPhys -= 1;
}
/* FIXME: should do something for other systems */
GetSystemInfo(&si);
lpmemex->ullTotalVirtual = (char*)si.lpMaximumApplicationAddress-(char*)si.lpMinimumApplicationAddress;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment