mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 22:20:26 +00:00
kernel32: GlobalMemoryStatusEx: return the size of physical memory + swapsize in ullTotalPageFile/ullAvailPageFile.
This commit is contained in:
parent
7d1ffb564f
commit
e1c6c97fc5
@ -1304,11 +1304,13 @@ BOOL WINAPI GlobalMemoryStatusEx( LPMEMORYSTATUSEX lpmemex )
|
||||
/ (lpmemex->ullTotalPhys / 100);
|
||||
}
|
||||
|
||||
/* Project2k refuses to start if it sees less than 1Mb of free swap */
|
||||
if (lpmemex->ullTotalPageFile < lpmemex->ullTotalPhys)
|
||||
lpmemex->ullTotalPageFile = lpmemex->ullTotalPhys;
|
||||
if (lpmemex->ullAvailPageFile < lpmemex->ullAvailPhys)
|
||||
lpmemex->ullAvailPageFile = lpmemex->ullAvailPhys;
|
||||
/* Win98 returns only the swapsize in ullTotalPageFile/ullAvailPageFile,
|
||||
WinXP returns the size of physical memory + swapsize;
|
||||
mimic the behavior of XP.
|
||||
Note: Project2k refuses to start if it sees less than 1Mb of free swap.
|
||||
*/
|
||||
lpmemex->ullTotalPageFile += lpmemex->ullTotalPhys;
|
||||
lpmemex->ullAvailPageFile += lpmemex->ullAvailPhys;
|
||||
|
||||
/* FIXME: should do something for other systems */
|
||||
GetSystemInfo(&si);
|
||||
|
Loading…
Reference in New Issue
Block a user