diff --git a/sample_shared/CMakeLists.txt b/sample_shared/CMakeLists.txt index ed1e782..059856c 100644 --- a/sample_shared/CMakeLists.txt +++ b/sample_shared/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_CXX_STANDARD 17) if(LINUX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") - if(CLANG) + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") endif() endif() diff --git a/source/gameanalytics/GACommon.h b/source/gameanalytics/GACommon.h index 37cdb79..225a7f6 100644 --- a/source/gameanalytics/GACommon.h +++ b/source/gameanalytics/GACommon.h @@ -85,7 +85,7 @@ namespace gameanalytics class GAState; } - constexpr const char* GA_VERSION_STR = "cpp 5.2.0"; + constexpr const char* GA_VERSION_STR = "cpp 5.3.1"; constexpr int MAX_CUSTOM_FIELDS_COUNT = 50; constexpr int MAX_CUSTOM_FIELDS_KEY_LENGTH = 64; diff --git a/source/gameanalytics/GAState.cpp b/source/gameanalytics/GAState.cpp index f1e8d8d..d17e578 100644 --- a/source/gameanalytics/GAState.cpp +++ b/source/gameanalytics/GAState.cpp @@ -638,6 +638,7 @@ namespace gameanalytics catch (json::exception& e) { logging::GALogger::e(e.what()); + store::GAStore::setState("sdk_config_cached", ""); } } diff --git a/source/gameanalytics/Platform/GALinux.cpp b/source/gameanalytics/Platform/GALinux.cpp index 417afb8..56dad87 100644 --- a/source/gameanalytics/Platform/GALinux.cpp +++ b/source/gameanalytics/Platform/GALinux.cpp @@ -81,9 +81,19 @@ std::string gameanalytics::GAPlatformLinux::getOSVersion() std::string version; int const strSize = strlen(info.release); + int dotCount = 0; for (size_t i = 0; i < strSize; ++i) - { - if (!isdigit(info.release[i]) && info.release[i] != '.') + { + if (info.release[i] == '.') + { + ++dotCount; + if (dotCount == 3) + { + version = std::string(info.release, info.release + i); + break; + } + } + else if (!isdigit(info.release[i])) { version = std::string(info.release, info.release + i); break;