diff options
author | Petr Mrázek <peterix@gmail.com> | 2016-11-26 02:18:05 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2016-11-26 02:18:05 +0100 |
commit | 55541c387c8096a941b6c007f97823d807967289 (patch) | |
tree | 30a89d360408e51de4cd00fbe8559c869e517ef9 /libraries/ganalytics/src/sys_win32.cpp | |
parent | d5fdc23eb29da45b4716f7515388d3c896dbd76a (diff) | |
download | MultiMC-55541c387c8096a941b6c007f97823d807967289.tar MultiMC-55541c387c8096a941b6c007f97823d807967289.tar.gz MultiMC-55541c387c8096a941b6c007f97823d807967289.tar.lz MultiMC-55541c387c8096a941b6c007f97823d807967289.tar.xz MultiMC-55541c387c8096a941b6c007f97823d807967289.zip |
NOISSUE simplify system detection and user agent handling
Now it only checks OS kernel name/version.
User agent is 'MultiMC5/$version'.
Kernel info is passed through custom dimensions in analytics.
Diffstat (limited to 'libraries/ganalytics/src/sys_win32.cpp')
-rw-r--r-- | libraries/ganalytics/src/sys_win32.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/libraries/ganalytics/src/sys_win32.cpp b/libraries/ganalytics/src/sys_win32.cpp index c2c913ef..4d43169b 100644 --- a/libraries/ganalytics/src/sys_win32.cpp +++ b/libraries/ganalytics/src/sys_win32.cpp @@ -2,21 +2,15 @@ #include <windows.h> -QString Sys::getSystemInfo() +Sys::KernelInfo Sys::getKernelInfo() { - static QString cached; - if(!cached.isNull()) - { - return cached; - } - else - { - OSVERSIONINFOW osvi; - ZeroMemory(&osvi, sizeof(OSVERSIONINFOW)); - GetVersionExW(&osvi); - cached = QString("Windows %1.%2").arg(osvi.dwMajorVersion).arg(osvi.dwMinorVersion); - return cached; - } + Sys::KernelInfo out; + out.kernelName = "Windows"; + OSVERSIONINFOW osvi; + ZeroMemory(&osvi, sizeof(OSVERSIONINFOW)); + GetVersionExW(&osvi); + out.kernelVersion = QString("%1.%2").arg(osvi.dwMajorVersion).arg(osvi.dwMinorVersion); + return out; } uint64_t Sys::getSystemRam() |