diff options
author | Petr Mrázek <peterix@gmail.com> | 2018-07-15 14:51:05 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2018-07-15 14:51:05 +0200 |
commit | bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9 (patch) | |
tree | e6497e304b7b9368367565fbc7c06efab1124b1c /libraries/systeminfo/src/sys_win32.cpp | |
parent | 03280cc62e75f8073f8d3d9e9e3952acf21fa77d (diff) | |
download | MultiMC-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.tar MultiMC-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.tar.gz MultiMC-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.tar.lz MultiMC-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.tar.xz MultiMC-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.zip |
NOISSUE tabs -> spaces
Diffstat (limited to 'libraries/systeminfo/src/sys_win32.cpp')
-rw-r--r-- | libraries/systeminfo/src/sys_win32.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/libraries/systeminfo/src/sys_win32.cpp b/libraries/systeminfo/src/sys_win32.cpp index cc1d61c1..a750b3a7 100644 --- a/libraries/systeminfo/src/sys_win32.cpp +++ b/libraries/systeminfo/src/sys_win32.cpp @@ -4,49 +4,49 @@ Sys::KernelInfo Sys::getKernelInfo() { - Sys::KernelInfo out; - out.kernelName = "Windows"; - OSVERSIONINFOW osvi; - ZeroMemory(&osvi, sizeof(OSVERSIONINFOW)); - osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW); - GetVersionExW(&osvi); - out.kernelVersion = QString("%1.%2").arg(osvi.dwMajorVersion).arg(osvi.dwMinorVersion); - return out; + Sys::KernelInfo out; + out.kernelName = "Windows"; + OSVERSIONINFOW osvi; + ZeroMemory(&osvi, sizeof(OSVERSIONINFOW)); + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW); + GetVersionExW(&osvi); + out.kernelVersion = QString("%1.%2").arg(osvi.dwMajorVersion).arg(osvi.dwMinorVersion); + return out; } uint64_t Sys::getSystemRam() { - MEMORYSTATUSEX status; - status.dwLength = sizeof(status); - GlobalMemoryStatusEx( &status ); - // bytes - return (uint64_t)status.ullTotalPhys; + MEMORYSTATUSEX status; + status.dwLength = sizeof(status); + GlobalMemoryStatusEx( &status ); + // bytes + return (uint64_t)status.ullTotalPhys; } bool Sys::isSystem64bit() { #if defined(_WIN64) - return true; + return true; #elif defined(_WIN32) - BOOL f64 = false; - return IsWow64Process(GetCurrentProcess(), &f64) && f64; + BOOL f64 = false; + return IsWow64Process(GetCurrentProcess(), &f64) && f64; #else - // it's some other kind of system... - return false; + // it's some other kind of system... + return false; #endif } bool Sys::isCPU64bit() { - SYSTEM_INFO info; - ZeroMemory(&info, sizeof(SYSTEM_INFO)); - GetNativeSystemInfo(&info); - auto arch = info.wProcessorArchitecture; - return arch == PROCESSOR_ARCHITECTURE_AMD64 || arch == PROCESSOR_ARCHITECTURE_IA64; + SYSTEM_INFO info; + ZeroMemory(&info, sizeof(SYSTEM_INFO)); + GetNativeSystemInfo(&info); + auto arch = info.wProcessorArchitecture; + return arch == PROCESSOR_ARCHITECTURE_AMD64 || arch == PROCESSOR_ARCHITECTURE_IA64; } Sys::DistributionInfo Sys::getDistributionInfo() { - DistributionInfo result; - return result; + DistributionInfo result; + return result; } |