summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}
}