kernel32: GlobalMemoryStatusEx: always report at least 1 byte of virtual memory even if none is available.
This commit is contained in:
parent
e1c6c97fc5
commit
70ff521a24
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue