summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-12-11 03:47:22 +0100
committerGitHub <noreply@github.com>2018-12-11 03:47:22 +0100
commit9eb9b344c7566b529fb3a7ac0feca86213c00d81 (patch)
tree47294f0b496b8f1320cad012ec920460a40100ba /src/core
parentMerge pull request #1883 from lioncash/log-fsp (diff)
parent web_service: move telemetry condition from TelemetrySession constructor to destructor (diff)
downloadyuzu-9eb9b344c7566b529fb3a7ac0feca86213c00d81.tar
yuzu-9eb9b344c7566b529fb3a7ac0feca86213c00d81.tar.gz
yuzu-9eb9b344c7566b529fb3a7ac0feca86213c00d81.tar.bz2
yuzu-9eb9b344c7566b529fb3a7ac0feca86213c00d81.tar.lz
yuzu-9eb9b344c7566b529fb3a7ac0feca86213c00d81.tar.xz
yuzu-9eb9b344c7566b529fb3a7ac0feca86213c00d81.tar.zst
yuzu-9eb9b344c7566b529fb3a7ac0feca86213c00d81.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/telemetry_session.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp
index a3b08c740..09ed74d78 100644
--- a/src/core/telemetry_session.cpp
+++ b/src/core/telemetry_session.cpp
@@ -103,13 +103,8 @@ bool VerifyLogin(const std::string& username, const std::string& token) {
TelemetrySession::TelemetrySession() {
#ifdef ENABLE_WEB_SERVICE
- if (Settings::values.enable_telemetry) {
- backend = std::make_unique<WebService::TelemetryJson>(Settings::values.web_api_url,
- Settings::values.yuzu_username,
- Settings::values.yuzu_token);
- } else {
- backend = std::make_unique<Telemetry::NullVisitor>();
- }
+ backend = std::make_unique<WebService::TelemetryJson>(
+ Settings::values.web_api_url, Settings::values.yuzu_username, Settings::values.yuzu_token);
#else
backend = std::make_unique<Telemetry::NullVisitor>();
#endif
@@ -180,7 +175,8 @@ TelemetrySession::~TelemetrySession() {
// This is just a placeholder to wrap up the session once the core completes and this is
// destroyed. This will be moved elsewhere once we are actually doing real I/O with the service.
field_collection.Accept(*backend);
- backend->Complete();
+ if (Settings::values.enable_telemetry)
+ backend->Complete();
backend = nullptr;
}