refactor: drop 64-bit check
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
@ -55,18 +55,6 @@ uint64_t Sys::getSystemRam()
|
||||
}
|
||||
}
|
||||
|
||||
bool Sys::isCPU64bit()
|
||||
{
|
||||
// not even going to pretend I'm going to support anything else
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Sys::isSystem64bit()
|
||||
{
|
||||
// yep. maybe when we have 128bit CPUs on consumer devices.
|
||||
return true;
|
||||
}
|
||||
|
||||
Sys::DistributionInfo Sys::getDistributionInfo()
|
||||
{
|
||||
DistributionInfo result;
|
||||
|
@ -82,17 +82,6 @@ uint64_t Sys::getSystemRam()
|
||||
return 0; // nothing found
|
||||
}
|
||||
|
||||
bool Sys::isCPU64bit()
|
||||
{
|
||||
return isSystem64bit();
|
||||
}
|
||||
|
||||
bool Sys::isSystem64bit()
|
||||
{
|
||||
// kernel build arch on linux
|
||||
return QSysInfo::currentCpuArchitecture() == "x86_64";
|
||||
}
|
||||
|
||||
Sys::DistributionInfo Sys::getDistributionInfo()
|
||||
{
|
||||
DistributionInfo systemd_info = read_os_release();
|
||||
|
@ -27,28 +27,6 @@ uint64_t Sys::getSystemRam()
|
||||
return (uint64_t)status.ullTotalPhys;
|
||||
}
|
||||
|
||||
bool Sys::isSystem64bit()
|
||||
{
|
||||
#if defined(_WIN64)
|
||||
return true;
|
||||
#elif defined(_WIN32)
|
||||
BOOL f64 = false;
|
||||
return IsWow64Process(GetCurrentProcess(), &f64) && f64;
|
||||
#else
|
||||
// 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;
|
||||
}
|
||||
|
||||
Sys::DistributionInfo Sys::getDistributionInfo()
|
||||
{
|
||||
DistributionInfo result;
|
||||
|
Reference in New Issue
Block a user