mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-07-12 10:45:51 +00:00
Correct memory reporting for Windows
This commit is contained in:
parent
4658c9fbc5
commit
c2e4ef7c81
@ -46,10 +46,9 @@ SysReqTableModel::SysReqTableModel(QObject* parent)
|
|||||||
}
|
}
|
||||||
m_cpuSpeedStr.sprintf("%g GHz", m_cpuSpeed / 1000.f);
|
m_cpuSpeedStr.sprintf("%g GHz", m_cpuSpeed / 1000.f);
|
||||||
#if _WIN32
|
#if _WIN32
|
||||||
MEMORYSTATUSEX memStat = {};
|
ULONGLONG memSize;
|
||||||
memStat.dwLength = sizeof(memStat);
|
GetPhysicallyInstalledSystemMemory(&memSize);
|
||||||
GlobalMemoryStatusEx(&memStat);
|
m_memorySize = memSize * 1024;
|
||||||
m_memorySize = memStat.ullTotalPhys;
|
|
||||||
#else
|
#else
|
||||||
m_memorySize = uint64_t(sysconf(_SC_PHYS_PAGES)) * sysconf(_SC_PAGESIZE);
|
m_memorySize = uint64_t(sysconf(_SC_PHYS_PAGES)) * sysconf(_SC_PAGESIZE);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user