summaryrefslogtreecommitdiffstats
path: root/libraries/ganalytics
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-11-25 00:39:15 +0100
committerPetr Mrázek <peterix@gmail.com>2016-11-25 00:39:15 +0100
commitd5fdc23eb29da45b4716f7515388d3c896dbd76a (patch)
tree71a285d3bf7aa2c3eca08dd7b035569ae3a3d4ae /libraries/ganalytics
parenta5fb931e8ee16015a31a675ef9c9fc5e856b003c (diff)
downloadMultiMC-d5fdc23eb29da45b4716f7515388d3c896dbd76a.tar
MultiMC-d5fdc23eb29da45b4716f7515388d3c896dbd76a.tar.gz
MultiMC-d5fdc23eb29da45b4716f7515388d3c896dbd76a.tar.lz
MultiMC-d5fdc23eb29da45b4716f7515388d3c896dbd76a.tar.xz
MultiMC-d5fdc23eb29da45b4716f7515388d3c896dbd76a.zip
NOISSUE dumb down Windows version detection...
Hopefully the analytics thing will accept it this time.
Diffstat (limited to 'libraries/ganalytics')
-rw-r--r--libraries/ganalytics/src/sys_win32.cpp31
1 files changed, 2 insertions, 29 deletions
diff --git a/libraries/ganalytics/src/sys_win32.cpp b/libraries/ganalytics/src/sys_win32.cpp
index ecef26e4..c2c913ef 100644
--- a/libraries/ganalytics/src/sys_win32.cpp
+++ b/libraries/ganalytics/src/sys_win32.cpp
@@ -11,38 +11,11 @@ QString Sys::getSystemInfo()
}
else
{
- // We support only Windows NT (XP and up) - everything else is not interesting.
OSVERSIONINFOW osvi;
ZeroMemory(&osvi, sizeof(OSVERSIONINFOW));
GetVersionExW(&osvi);
- QString os = QString("Windows NT %1.%2").arg(osvi.dwMajorVersion).arg(osvi.dwMinorVersion);
-
-#if defined(_WIN64)
- // 64-bit programs run only on Win64
- os.append("; Win64");
- // determine CPU type
- SYSTEM_INFO info;
- ZeroMemory(&info, sizeof(SYSTEM_INFO));
- GetNativeSystemInfo(&info);
- auto arch = info.wProcessorArchitecture;
- if(arch == PROCESSOR_ARCHITECTURE_AMD64)
- {
- os.append("; x64");
- }
- else if (arch == PROCESSOR_ARCHITECTURE_IA64)
- {
- os.append("; IA64");
- }
-#elif defined(_WIN32)
- // 32-bit programs run on both 32-bit and 64-bit Windows
- // so must sniff
- BOOL f64 = false;
- if(IsWow64Process(GetCurrentProcess(), &f64) && f64)
- {
- os.append("; WOW64");
- }
-#endif
- return os;
+ cached = QString("Windows %1.%2").arg(osvi.dwMajorVersion).arg(osvi.dwMinorVersion);
+ return cached;
}
}