From d5fdc23eb29da45b4716f7515388d3c896dbd76a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Fri, 25 Nov 2016 00:39:15 +0100 Subject: NOISSUE dumb down Windows version detection... Hopefully the analytics thing will accept it this time. --- libraries/ganalytics/src/sys_win32.cpp | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) (limited to 'libraries/ganalytics/src/sys_win32.cpp') 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; } } -- cgit v1.2.3