From df5f351adde6db444265dac2691fab4e0ac37add Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Wed, 12 Nov 2025 00:09:41 -0500 Subject: [PATCH] DolphinAnalytics: Only call ReloadConfig in config changed callback when analytics enabled value changes Co-authored-by: Simonx22 --- Source/Core/Core/DolphinAnalytics.cpp | 13 +++++++++++-- Source/Core/Core/DolphinAnalytics.h | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/DolphinAnalytics.cpp b/Source/Core/Core/DolphinAnalytics.cpp index c84565ec528..5aa79360388 100644 --- a/Source/Core/Core/DolphinAnalytics.cpp +++ b/Source/Core/Core/DolphinAnalytics.cpp @@ -57,10 +57,19 @@ void DolphinAnalytics::AndroidSetGetValFunc(std::function new_backend; - if (Config::Get(Config::MAIN_ANALYTICS_ENABLED)) + if (m_last_analytics_enabled) { new_backend = std::make_unique(ANALYTICS_ENDPOINT); } diff --git a/Source/Core/Core/DolphinAnalytics.h b/Source/Core/Core/DolphinAnalytics.h index b4ff4877df9..595736e821d 100644 --- a/Source/Core/Core/DolphinAnalytics.h +++ b/Source/Core/Core/DolphinAnalytics.h @@ -203,4 +203,5 @@ private: std::mutex m_reporter_mutex; Common::AnalyticsReporter m_reporter; Config::ConfigChangedCallbackID m_config_changed_callback_id{}; + bool m_last_analytics_enabled = false; };