Преглед изворни кода

yuzu: Remove usage of the global telemetry accessor

In these cases the system object is nearby, and in the other, the
long-form of accessing the telemetry instance is already used, so we can
get rid of the use of the global accessor.
Lioncash пре 7 година
родитељ
комит
319365fdf0
2 измењених фајлова са 3 додато и 3 уклоњено
  1. 2 2
      src/yuzu/compatdb.cpp
  2. 1 1
      src/yuzu/main.cpp

+ 2 - 2
src/yuzu/compatdb.cpp

@@ -53,8 +53,8 @@ void CompatDB::Submit() {
     case CompatDBPage::Final:
     case CompatDBPage::Final:
         back();
         back();
         LOG_DEBUG(Frontend, "Compatibility Rating: {}", compatibility->checkedId());
         LOG_DEBUG(Frontend, "Compatibility Rating: {}", compatibility->checkedId());
-        Core::Telemetry().AddField(Telemetry::FieldType::UserFeedback, "Compatibility",
-                                   compatibility->checkedId());
+        Core::System::GetInstance().TelemetrySession().AddField(
+            Telemetry::FieldType::UserFeedback, "Compatibility", compatibility->checkedId());
 
 
         button(NextButton)->setEnabled(false);
         button(NextButton)->setEnabled(false);
         button(NextButton)->setText(tr("Submitting"));
         button(NextButton)->setText(tr("Submitting"));

+ 1 - 1
src/yuzu/main.cpp

@@ -846,7 +846,7 @@ bool GMainWindow::LoadROM(const QString& filename) {
     }
     }
     game_path = filename;
     game_path = filename;
 
 
-    Core::Telemetry().AddField(Telemetry::FieldType::App, "Frontend", "Qt");
+    system.TelemetrySession().AddField(Telemetry::FieldType::App, "Frontend", "Qt");
     return true;
     return true;
 }
 }