Merge branch 'master' of ssh://gitlab.axiodl.com:6431/AxioDL/hecl-gui

This commit is contained in:
Jack Andersen 2017-12-27 17:48:18 -10:00
commit dc94735a70
1 changed files with 3 additions and 4 deletions

View File

@ -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