diff options
Diffstat (limited to 'src/core/telemetry_session.cpp')
| -rw-r--r-- | src/core/telemetry_session.cpp | 12 |
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) { | |||
| 103 | 103 | ||
| 104 | TelemetrySession::TelemetrySession() { | 104 | TelemetrySession::TelemetrySession() { |
| 105 | #ifdef ENABLE_WEB_SERVICE | 105 | #ifdef ENABLE_WEB_SERVICE |
| 106 | if (Settings::values.enable_telemetry) { | 106 | backend = std::make_unique<WebService::TelemetryJson>( |
| 107 | backend = std::make_unique<WebService::TelemetryJson>(Settings::values.web_api_url, | 107 | Settings::values.web_api_url, Settings::values.yuzu_username, Settings::values.yuzu_token); |
| 108 | Settings::values.yuzu_username, | ||
| 109 | Settings::values.yuzu_token); | ||
| 110 | } else { | ||
| 111 | backend = std::make_unique<Telemetry::NullVisitor>(); | ||
| 112 | } | ||
| 113 | #else | 108 | #else |
| 114 | backend = std::make_unique<Telemetry::NullVisitor>(); | 109 | backend = std::make_unique<Telemetry::NullVisitor>(); |
| 115 | #endif | 110 | #endif |
| @@ -180,7 +175,8 @@ TelemetrySession::~TelemetrySession() { | |||
| 180 | // This is just a placeholder to wrap up the session once the core completes and this is | 175 | // This is just a placeholder to wrap up the session once the core completes and this is |
| 181 | // destroyed. This will be moved elsewhere once we are actually doing real I/O with the service. | 176 | // destroyed. This will be moved elsewhere once we are actually doing real I/O with the service. |
| 182 | field_collection.Accept(*backend); | 177 | field_collection.Accept(*backend); |
| 183 | backend->Complete(); | 178 | if (Settings::values.enable_telemetry) |
| 179 | backend->Complete(); | ||
| 184 | backend = nullptr; | 180 | backend = nullptr; |
| 185 | } | 181 | } |
| 186 | 182 | ||