From 563be55156d6174c186978ebe42a2fadca55d160 Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Fri, 12 Apr 2024 18:35:18 +0100 Subject: [PATCH] Reverted prior quick telemetry fix to make way for a proper fix --- dist/languages/da_DK.ts | 5 ++++ dist/languages/de.ts | 5 ++++ dist/languages/el.ts | 5 ++++ dist/languages/es_ES.ts | 5 ++++ dist/languages/fi.ts | 5 ++++ dist/languages/fr.ts | 5 ++++ dist/languages/hu_HU.ts | 5 ++++ dist/languages/id.ts | 5 ++++ dist/languages/it.ts | 5 ++++ dist/languages/ja_JP.ts | 5 ++++ dist/languages/ko_KR.ts | 5 ++++ dist/languages/lt_LT.ts | 5 ++++ dist/languages/nb.ts | 5 ++++ dist/languages/nl.ts | 5 ++++ dist/languages/pl_PL.ts | 5 ++++ dist/languages/pt_BR.ts | 5 ++++ dist/languages/ro_RO.ts | 5 ++++ dist/languages/ru_RU.ts | 5 ++++ dist/languages/tr_TR.ts | 5 ++++ dist/languages/vi_VN.ts | 5 ++++ dist/languages/zh_CN.ts | 5 ++++ dist/languages/zh_TW.ts | 5 ++++ src/android/app/src/main/jni/config.cpp | 5 ++-- src/android/app/src/main/jni/default_ini.h | 5 +--- src/android/app/src/main/jni/native.cpp | 6 +---- src/common/detached_tasks.h | 8 +++--- src/core/core.cpp | 12 --------- src/core/hle/service/apt/apt.cpp | 5 ---- src/core/loader/ncch.cpp | 4 --- src/lime/config.cpp | 5 ++-- src/lime/default_ini.h | 5 +--- src/lime/lime.cpp | 5 +--- src/lime_qt/compatdb.cpp | 10 ++------ src/lime_qt/compatdb.h | 8 +----- src/lime_qt/configuration/config.cpp | 10 ++++---- src/lime_qt/main.cpp | 13 +++++----- src/lime_qt/main.h | 1 - src/video_core/renderer_opengl/gl_driver.cpp | 10 +------- src/video_core/renderer_opengl/gl_driver.h | 7 +----- src/video_core/renderer_opengl/pica_to_gl.h | 4 --- .../renderer_opengl/renderer_opengl.cpp | 6 ++--- .../renderer_vulkan/renderer_vulkan.cpp | 6 ++--- .../renderer_vulkan/vk_instance.cpp | 25 +++++-------------- src/video_core/renderer_vulkan/vk_instance.h | 12 +++------ 44 files changed, 154 insertions(+), 128 deletions(-) diff --git a/dist/languages/da_DK.ts b/dist/languages/da_DK.ts index 2db20d8e9..5b8591fb2 100644 --- a/dist/languages/da_DK.ts +++ b/dist/languages/da_DK.ts @@ -3893,6 +3893,11 @@ Please check your FFmpeg installation used for compilation. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonym data bliver indsamlet</a>for at hjælpe med at forbedre Citra.<br/><br/>Har du lyst til at dele din brugsdata med os? + Telemetry diff --git a/dist/languages/de.ts b/dist/languages/de.ts index b41021c08..9e1d47ff4 100644 --- a/dist/languages/de.ts +++ b/dist/languages/de.ts @@ -3895,6 +3895,11 @@ Please check your FFmpeg installation used for compilation. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + Möchten Sie <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>anonyme Nutzungsdaten</a> an das Citra Team senden und so helfen, Citra weiter zu verbessern? + Telemetry diff --git a/dist/languages/el.ts b/dist/languages/el.ts index f17975288..8b43e905e 100644 --- a/dist/languages/el.ts +++ b/dist/languages/el.ts @@ -3894,6 +3894,11 @@ Please check your FFmpeg installation used for compilation. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Συλλέγονται ανώνυμα δεδομένα</a> για τη βελτίωση του Citra. <br/><br/>Θέλετε να μοιραστείτε τα δεδομένα χρήσης σας με εμάς; + Telemetry diff --git a/dist/languages/es_ES.ts b/dist/languages/es_ES.ts index bad353b36..815d48013 100644 --- a/dist/languages/es_ES.ts +++ b/dist/languages/es_ES.ts @@ -3896,6 +3896,11 @@ Por favor, compruebe la instalación de FFmpeg usada para la compilación. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Se recogen datos anónimos</a> para ayudar a mejorar Citra. <br/><br/>¿Quieres compartir tus datos de uso con nosotros? + Telemetry diff --git a/dist/languages/fi.ts b/dist/languages/fi.ts index dd35acde8..9b51542da 100644 --- a/dist/languages/fi.ts +++ b/dist/languages/fi.ts @@ -3893,6 +3893,11 @@ Please check your FFmpeg installation used for compilation. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonyymiä tietoa kerätään</a>parantaaksemme Citraa. <br/><br/>Haluaisitko jakaa käyttötetoa meidän kanssa? + Telemetry diff --git a/dist/languages/fr.ts b/dist/languages/fr.ts index ffd6f79b1..50d259246 100644 --- a/dist/languages/fr.ts +++ b/dist/languages/fr.ts @@ -3896,6 +3896,11 @@ Veuillez vérifier votre installation FFmpeg utilisée pour la compilation. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Des données anonymes sont collectées</a> afin d'aider à l'amélioration de Citra. <br/><br/>Souhaitez vous communiquer vos données avec nous ? + Telemetry diff --git a/dist/languages/hu_HU.ts b/dist/languages/hu_HU.ts index f46ade37d..3c4f353fe 100644 --- a/dist/languages/hu_HU.ts +++ b/dist/languages/hu_HU.ts @@ -3892,6 +3892,11 @@ Please check your FFmpeg installation used for compilation. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + + Telemetry diff --git a/dist/languages/id.ts b/dist/languages/id.ts index bd4fc5c34..87f5852f9 100644 --- a/dist/languages/id.ts +++ b/dist/languages/id.ts @@ -3895,6 +3895,11 @@ Please check your FFmpeg installation used for compilation. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Data anonim dikumpulkan</a>untuk membantu Citra menjadi lebih baik. <br/><br/>Apakah Anda ingin membagikan penggunaan data Anda dengan kami? + Telemetry diff --git a/dist/languages/it.ts b/dist/languages/it.ts index f69cec615..c85467f0a 100644 --- a/dist/languages/it.ts +++ b/dist/languages/it.ts @@ -3896,6 +3896,11 @@ Verifica l'installazione di FFmpeg usata per la compilazione. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Vengono raccolti dati anonimi </a> per aiutare lo sviluppo di Citra. <br/><br/>Vuoi condividere i tuoi dati di utilizzo con noi? + Telemetry diff --git a/dist/languages/ja_JP.ts b/dist/languages/ja_JP.ts index ba1b7c3c3..32a50cefe 100644 --- a/dist/languages/ja_JP.ts +++ b/dist/languages/ja_JP.ts @@ -3897,6 +3897,11 @@ Please check your FFmpeg installation used for compilation. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>匿名のデータ</a>がCitraの改善のために収集されます<br/><br/>利用状況データの提供に同意しますか? + Telemetry diff --git a/dist/languages/ko_KR.ts b/dist/languages/ko_KR.ts index 2e75fc3ea..c44965af1 100644 --- a/dist/languages/ko_KR.ts +++ b/dist/languages/ko_KR.ts @@ -3896,6 +3896,11 @@ Please check your FFmpeg installation used for compilation. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + Citra를 개선하기위해 <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>익명데이터가 수집됩니다</a>. <br/><br/>사용 데이터를 공유하시겠습니까? + Telemetry diff --git a/dist/languages/lt_LT.ts b/dist/languages/lt_LT.ts index e3108da21..bf983dbe1 100644 --- a/dist/languages/lt_LT.ts +++ b/dist/languages/lt_LT.ts @@ -3891,6 +3891,11 @@ Please check your FFmpeg installation used for compilation. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anoniminiai duomenys yra renkami </a> kad padėtumėte Citra komandai. <br/><br/>Ar norite pasidalinti savo duomenimis su mumis? + Telemetry diff --git a/dist/languages/nb.ts b/dist/languages/nb.ts index d6fb8588f..332aab69a 100644 --- a/dist/languages/nb.ts +++ b/dist/languages/nb.ts @@ -3894,6 +3894,11 @@ Please check your FFmpeg installation used for compilation. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonym data samles inn</a> for å forbedre Citra. <br/><br/>Vil du dele dine brukerdata med oss? + Telemetry diff --git a/dist/languages/nl.ts b/dist/languages/nl.ts index bddcfbc49..855ab24ed 100644 --- a/dist/languages/nl.ts +++ b/dist/languages/nl.ts @@ -3896,6 +3896,11 @@ Controleer de FFmpeg-installatie die wordt gebruikt voor de compilatie. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonieme gegevens worden verzameld</a> om Citra te helpen verbeteren. <br/><br/> Wilt u uw gebruiksgegevens met ons delen? + Telemetry diff --git a/dist/languages/pl_PL.ts b/dist/languages/pl_PL.ts index f38ece200..15f38469e 100644 --- a/dist/languages/pl_PL.ts +++ b/dist/languages/pl_PL.ts @@ -3893,6 +3893,11 @@ Please check your FFmpeg installation used for compilation. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonimowe dane są zbierane</a> w celu wsparcia rozwoju Citry. <br/><br/>Czy chciałbyś się z nami podzielić danymi użytkowania? + Telemetry diff --git a/dist/languages/pt_BR.ts b/dist/languages/pt_BR.ts index 0fc4fbeb3..d6aea8210 100644 --- a/dist/languages/pt_BR.ts +++ b/dist/languages/pt_BR.ts @@ -3895,6 +3895,11 @@ Please check your FFmpeg installation used for compilation. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Dados anônimos são recolhidos</a> para ajudar a melhorar o Citra. <br/><br/>Gostaria de compartilhar os seus dados de utilização conosco? + Telemetry diff --git a/dist/languages/ro_RO.ts b/dist/languages/ro_RO.ts index adf933954..d9a229e43 100644 --- a/dist/languages/ro_RO.ts +++ b/dist/languages/ro_RO.ts @@ -3894,6 +3894,11 @@ Please check your FFmpeg installation used for compilation. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Date anonime sunt colectate</a> pentru a ajuta îmbunătățirea lui Citra. <br/><br/> Doriți să partajați uzul de datele cu noi? + Telemetry diff --git a/dist/languages/ru_RU.ts b/dist/languages/ru_RU.ts index 95fc8daa1..c4489deed 100644 --- a/dist/languages/ru_RU.ts +++ b/dist/languages/ru_RU.ts @@ -3898,6 +3898,11 @@ Please check your FFmpeg installation used for compilation. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + Для оказания помощи в улучшении приложения Citra <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>проводится сбор анонимных данных</a>. <br/><br/>Поделиться данными об использовании? + Telemetry diff --git a/dist/languages/tr_TR.ts b/dist/languages/tr_TR.ts index 6ac5353ee..3ff61ed58 100644 --- a/dist/languages/tr_TR.ts +++ b/dist/languages/tr_TR.ts @@ -3893,6 +3893,11 @@ Please check your FFmpeg installation used for compilation. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Citrayı geliştirmeye yardımcı olmak için</a> anonim veri toplandı. <br/><br/>Kullanım verinizi bizimle paylaşmak ister misiniz? + Telemetry diff --git a/dist/languages/vi_VN.ts b/dist/languages/vi_VN.ts index 64784a498..060857944 100644 --- a/dist/languages/vi_VN.ts +++ b/dist/languages/vi_VN.ts @@ -3893,6 +3893,11 @@ Please check your FFmpeg installation used for compilation. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Dữ liệu ẩn danh được thu thập</a> để giúp cải thiện Citra. <br/><br/>Bạn có muốn chia sẻ dữ liệu của bạn với chúng tôi? + Telemetry diff --git a/dist/languages/zh_CN.ts b/dist/languages/zh_CN.ts index e7c0b3a6c..885b304c3 100644 --- a/dist/languages/zh_CN.ts +++ b/dist/languages/zh_CN.ts @@ -3896,6 +3896,11 @@ Please check your FFmpeg installation used for compilation. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>我们收集匿名数据</a>来帮助改进 Citra 。<br/><br/>您愿意和我们分享你的使用数据吗? + Telemetry diff --git a/dist/languages/zh_TW.ts b/dist/languages/zh_TW.ts index 43de7b0c8..466f8070d 100644 --- a/dist/languages/zh_TW.ts +++ b/dist/languages/zh_TW.ts @@ -3894,6 +3894,11 @@ Please check your FFmpeg installation used for compilation. GMainWindow + + + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous data is collected</a> to help improve Citra. <br/><br/>Would you like to share your usage data with us? + <a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>收集匿名的使用資料</a>可以用來改善 Citra。<br/><br/>您同意將您的使用資料分享給 Citra 嗎? + Telemetry diff --git a/src/android/app/src/main/jni/config.cpp b/src/android/app/src/main/jni/config.cpp index 2ac5d5954..fce2a244c 100644 --- a/src/android/app/src/main/jni/config.cpp +++ b/src/android/app/src/main/jni/config.cpp @@ -264,9 +264,8 @@ void Config::ReadValues() { } // Web Service - NetSettings::values.enable_telemetry = - sdl2_config->GetBoolean("WebService", "enable_telemetry", false); - NetSettings::values.web_api_url = sdl2_config->GetString("WebService", "web_api_url", ""); + NetSettings::values.web_api_url = + sdl2_config->GetString("WebService", "web_api_url", "https://api.citra-emu.org"); NetSettings::values.citra_username = sdl2_config->GetString("WebService", "citra_username", ""); NetSettings::values.citra_token = sdl2_config->GetString("WebService", "citra_token", ""); } diff --git a/src/android/app/src/main/jni/default_ini.h b/src/android/app/src/main/jni/default_ini.h index 198dae62d..c46395fea 100644 --- a/src/android/app/src/main/jni/default_ini.h +++ b/src/android/app/src/main/jni/default_ini.h @@ -353,11 +353,8 @@ gdbstub_port=24689 # To LLE a service module add "LLE\=true" [WebService] -# Whether or not to enable telemetry -# 0 (default): No, 1: Yes -enable_telemetry = # URL for Web API -web_api_url = +web_api_url = https://api.citra-emu.org # Username and token for Citra Web Service # See https://profile.citra-emu.org/ for more info citra_username = diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index 9ffee4211..4010a1b81 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp @@ -38,7 +38,6 @@ #include "core/hle/service/nfc/nfc.h" #include "core/loader/loader.h" #include "core/savestate.h" -#include "core/telemetry_session.h" #include "jni/android_common/android_common.h" #include "jni/applets/mii_selector.h" #include "jni/applets/swkbd.h" @@ -166,7 +165,7 @@ static Core::System::ResultStatus RunCitra(const std::string& filepath) { #elif ENABLE_VULKAN window = std::make_unique(s_surf, vulkan_library); #else -// TODO: Add a null renderer backend for this, perhaps. + // TODO: Add a null renderer backend for this, perhaps. #error "At least one renderer must be enabled." #endif break; @@ -208,9 +207,6 @@ static Core::System::ResultStatus RunCitra(const std::string& filepath) { return load_result; } - auto& telemetry_session = system.TelemetrySession(); - telemetry_session.AddField(Common::Telemetry::FieldType::App, "Frontend", "Android"); - stop_run = false; pause_emulation = false; diff --git a/src/common/detached_tasks.h b/src/common/detached_tasks.h index 5dd8fc27b..251cbab4f 100644 --- a/src/common/detached_tasks.h +++ b/src/common/detached_tasks.h @@ -12,10 +12,10 @@ namespace Common { /** * A background manager which ensures that all detached task is finished before program exits. * - * Some tasks, telemetry submission for example, prefer executing asynchronously and don't care - * about the result. These tasks are suitable for std::thread::detach(). However, this is unsafe if - * the task is launched just before the program exits (which is a common case for telemetry), so we - * need to block on these tasks on program exit. + * Some tasks prefer executing asynchronously and don't care + * about the result. These tasks are suitable for std::thread::detach(). + * However, this is unsafe if the task is launched just before the program exits + * so we need to block on these tasks on program exit. * * To make detached task safe, a single DetachedTasks object should be placed in the main(), and * call WaitForAllTasks() after all program execution but before global/static variable destruction. diff --git a/src/core/core.cpp b/src/core/core.cpp index 7e969f20a..6acaf6048 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -310,7 +310,6 @@ System::ResultStatus System::Load(Frontend::EmuWindow& emu_window, const std::st restore_plugin_context.reset(); } - telemetry_session->AddInitialInfo(*app_loader); std::shared_ptr process; const Loader::ResultStatus load_result{app_loader->Load(process)}; if (Loader::ResultStatus::Success != load_result) { @@ -566,17 +565,6 @@ void System::RegisterImageInterface(std::shared_ptr im } void System::Shutdown(bool is_deserializing) { - // Log last frame performance stats - const auto perf_results = GetAndResetPerfStats(); - constexpr auto performance = Common::Telemetry::FieldType::Performance; - - telemetry_session->AddField(performance, "Shutdown_EmulationSpeed", - perf_results.emulation_speed * 100.0); - telemetry_session->AddField(performance, "Shutdown_Framerate", perf_results.game_fps); - telemetry_session->AddField(performance, "Shutdown_Frametime", perf_results.frametime * 1000.0); - telemetry_session->AddField(performance, "Mean_Frametime_MS", - perf_stats ? perf_stats->GetMeanFrametime() : 0); - // Shutdown emulation session is_powered_on = false; diff --git a/src/core/hle/service/apt/apt.cpp b/src/core/hle/service/apt/apt.cpp index a3befffd8..3e552dfc4 100644 --- a/src/core/hle/service/apt/apt.cpp +++ b/src/core/hle/service/apt/apt.cpp @@ -34,7 +34,6 @@ #include "core/hw/aes/ccm.h" #include "core/hw/aes/key.h" #include "core/loader/loader.h" -#include "core/telemetry_session.h" SERVICE_CONSTRUCT_IMPL(Service::APT::Module) @@ -274,10 +273,6 @@ void Module::APTInterface::GetSharedFont(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp(ctx); IPC::RequestBuilder rb = rp.MakeBuilder(2, 2); - // Log in telemetry if the game uses the shared font - apt->system.TelemetrySession().AddField(Common::Telemetry::FieldType::Session, - "RequiresSharedFont", true); - if (!apt->shared_font_loaded) { // On real 3DS, font loading happens on booting. However, we load it on demand to coordinate // with CFG region auto configuration, which happens later than APT initialization. diff --git a/src/core/loader/ncch.cpp b/src/core/loader/ncch.cpp index 337177a88..29ad40cac 100644 --- a/src/core/loader/ncch.cpp +++ b/src/core/loader/ncch.cpp @@ -26,7 +26,6 @@ #include "core/loader/smdh.h" #include "core/memory.h" #include "core/system_titles.h" -#include "core/telemetry_session.h" #include "network/network.h" namespace Loader { @@ -274,9 +273,6 @@ ResultStatus AppLoader_NCCH::Load(std::shared_ptr& process) { overlay_ncch = &update_ncch; } - system.TelemetrySession().AddField(Common::Telemetry::FieldType::Session, "ProgramId", - program_id); - if (auto room_member = Network::GetRoomMember().lock()) { Network::GameInfo game_info; ReadTitle(game_info.name); diff --git a/src/lime/config.cpp b/src/lime/config.cpp index 10fd17e02..dec7acbd1 100644 --- a/src/lime/config.cpp +++ b/src/lime/config.cpp @@ -326,9 +326,8 @@ void Config::ReadValues() { } // Web Service - NetSettings::values.enable_telemetry = - sdl2_config->GetBoolean("WebService", "enable_telemetry", false); - NetSettings::values.web_api_url = sdl2_config->GetString("WebService", "web_api_url", ""); + NetSettings::values.web_api_url = + sdl2_config->GetString("WebService", "web_api_url", "https://api.citra-emu.org"); NetSettings::values.citra_username = sdl2_config->GetString("WebService", "citra_username", ""); NetSettings::values.citra_token = sdl2_config->GetString("WebService", "citra_token", ""); diff --git a/src/lime/default_ini.h b/src/lime/default_ini.h index a99fdc81e..b3cdf9293 100644 --- a/src/lime/default_ini.h +++ b/src/lime/default_ini.h @@ -361,11 +361,8 @@ renderer_debug = # To LLE a service module add "LLE\=true" [WebService] -# Whether or not to enable telemetry -# 0 (default): No, 1: Yes -enable_telemetry = # URL for Web API -web_api_url = +web_api_url = https://api.citra-emu.org # Username and token for Citra Web Service # See https://profile.citra-emu.org/ for more info citra_username = diff --git a/src/lime/lime.cpp b/src/lime/lime.cpp index a3f57b34c..5e882f6b0 100644 --- a/src/lime/lime.cpp +++ b/src/lime/lime.cpp @@ -39,7 +39,6 @@ #include "core/hle/service/am/am.h" #include "core/hle/service/cfg/cfg.h" #include "core/movie.h" -#include "core/telemetry_session.h" #include "input_common/main.h" #include "network/network.h" #include "video_core/gpu.h" @@ -386,7 +385,7 @@ int main(int argc, char** argv) { #elif ENABLE_SOFTWARE_RENDERER return std::make_unique(system, fullscreen, is_secondary); #else -// TODO: Add a null renderer backend for this, perhaps. + // TODO: Add a null renderer backend for this, perhaps. #error "At least one renderer must be enabled." #endif } @@ -436,8 +435,6 @@ int main(int argc, char** argv) { break; } - system.TelemetrySession().AddField(Common::Telemetry::FieldType::App, "Frontend", "SDL"); - if (use_multiplayer) { if (auto member = Network::GetRoomMember().lock()) { member->BindOnChatMessageRecieved(OnMessageReceived); diff --git a/src/lime_qt/compatdb.cpp b/src/lime_qt/compatdb.cpp index fe51b264a..506706fe9 100644 --- a/src/lime_qt/compatdb.cpp +++ b/src/lime_qt/compatdb.cpp @@ -6,15 +6,13 @@ #include #include #include -#include "common/telemetry.h" #include "core/core.h" -#include "core/telemetry_session.h" #include "lime_qt/compatdb.h" #include "ui_compatdb.h" -CompatDB::CompatDB(Core::TelemetrySession& telemetry_session_, QWidget* parent) +CompatDB::CompatDB(QWidget* parent) : QWizard(parent, Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::WindowSystemMenuHint), - ui{std::make_unique()}, telemetry_session{telemetry_session_} { + ui{std::make_unique()} { ui->setupUi(this); connect(ui->radioButton_Perfect, &QRadioButton::clicked, this, &CompatDB::EnableNext); connect(ui->radioButton_Great, &QRadioButton::clicked, this, &CompatDB::EnableNext); @@ -52,15 +50,11 @@ void CompatDB::Submit() { case CompatDBPage::Final: back(); LOG_DEBUG(Frontend, "Compatibility Rating: {}", compatibility->checkedId()); - telemetry_session.AddField(Common::Telemetry::FieldType::UserFeedback, "Compatibility", - compatibility->checkedId()); button(NextButton)->setEnabled(false); button(NextButton)->setText(tr("Submitting")); button(CancelButton)->setVisible(false); - testcase_watcher.setFuture( - QtConcurrent::run([this] { return telemetry_session.SubmitTestcase(); })); break; default: LOG_ERROR(Frontend, "Unexpected page: {}", currentId()); diff --git a/src/lime_qt/compatdb.h b/src/lime_qt/compatdb.h index b8ae5e209..5381f67f7 100644 --- a/src/lime_qt/compatdb.h +++ b/src/lime_qt/compatdb.h @@ -8,10 +8,6 @@ #include #include -namespace Core { -class TelemetrySession; -} - namespace Ui { class CompatDB; } @@ -20,7 +16,7 @@ class CompatDB : public QWizard { Q_OBJECT public: - explicit CompatDB(Core::TelemetrySession& telemetry_session_, QWidget* parent = nullptr); + explicit CompatDB(QWidget* parent = nullptr); ~CompatDB(); private: @@ -31,6 +27,4 @@ private: void Submit(); void OnTestcaseSubmitted(); void EnableNext(); - - Core::TelemetrySession& telemetry_session; }; diff --git a/src/lime_qt/configuration/config.cpp b/src/lime_qt/configuration/config.cpp index 5dce0620a..3cadfb8ca 100644 --- a/src/lime_qt/configuration/config.cpp +++ b/src/lime_qt/configuration/config.cpp @@ -836,10 +836,10 @@ void Config::ReadUpdaterValues() { void Config::ReadWebServiceValues() { qt_config->beginGroup(QStringLiteral("WebService")); - NetSettings::values.enable_telemetry = - ReadSetting(QStringLiteral("enable_telemetry"), false).toBool(); NetSettings::values.web_api_url = - ReadSetting(QStringLiteral("web_api_url"), QStringLiteral("")).toString().toStdString(); + ReadSetting(QStringLiteral("web_api_url"), QStringLiteral("https://api.citra-emu.org")) + .toString() + .toStdString(); NetSettings::values.citra_username = ReadSetting(QStringLiteral("citra_username")).toString().toStdString(); NetSettings::values.citra_token = @@ -1315,9 +1315,9 @@ void Config::SaveUpdaterValues() { void Config::SaveWebServiceValues() { qt_config->beginGroup(QStringLiteral("WebService")); - WriteSetting(QStringLiteral("enable_telemetry"), NetSettings::values.enable_telemetry, false); WriteSetting(QStringLiteral("web_api_url"), - QString::fromStdString(NetSettings::values.web_api_url), QStringLiteral("")); + QString::fromStdString(NetSettings::values.web_api_url), + QStringLiteral("https://api.citra-emu.org")); WriteSetting(QStringLiteral("citra_username"), QString::fromStdString(NetSettings::values.citra_username)); WriteSetting(QStringLiteral("citra_token"), diff --git a/src/lime_qt/main.cpp b/src/lime_qt/main.cpp index 3b87fdae0..a706bc1b9 100644 --- a/src/lime_qt/main.cpp +++ b/src/lime_qt/main.cpp @@ -15,7 +15,6 @@ #include #include #include -#include "core/telemetry_session.h" #ifdef __APPLE__ #include // for chdir #endif @@ -123,6 +122,12 @@ __declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001; constexpr int default_mouse_timeout = 2500; +/** + * "Callouts" are one-time instructional messages shown to the user. In the config settings, there + * is a bitfield "callout_flags" options, used to track if a message has already been shown to the + * user. This is 32-bits - if we have more than 32 callouts, we should retire and recycle old ones. + */ + const int GMainWindow::max_recent_files_item; static QString PrettyProductName() { @@ -236,9 +241,6 @@ GMainWindow::GMainWindow(Core::System& system_) game_list->LoadCompatibilityList(); game_list->PopulateAsync(UISettings::values.game_dirs); - NetSettings::values.enable_telemetry = false; - system.ApplySettings(); - mouse_hide_timer.setInterval(default_mouse_timeout); connect(&mouse_hide_timer, &QTimer::timeout, this, &GMainWindow::HideMouseCursor); connect(ui->menubar, &QMenuBar::hovered, this, &GMainWindow::OnMouseActivity); @@ -1220,7 +1222,6 @@ bool GMainWindow::LoadROM(const QString& filename) { game_path = filename; - system.TelemetrySession().AddField(Common::Telemetry::FieldType::App, "Frontend", "Qt"); return true; } @@ -1966,7 +1967,7 @@ void GMainWindow::OnLoadComplete() { void GMainWindow::OnMenuReportCompatibility() { if (!NetSettings::values.citra_token.empty() && !NetSettings::values.citra_username.empty()) { - CompatDB compatdb{system.TelemetrySession(), this}; + CompatDB compatdb{this}; compatdb.exec(); } else { QMessageBox::critical(this, tr("Missing Citra Account"), diff --git a/src/lime_qt/main.h b/src/lime_qt/main.h index 589c5f5d0..4188ed0d8 100644 --- a/src/lime_qt/main.h +++ b/src/lime_qt/main.h @@ -152,7 +152,6 @@ private: void BootGame(const QString& filename); void ShutdownGame(); - void ShowTelemetryCallout(); void SetDiscordEnabled(bool state); void LoadAmiibo(const QString& filename); diff --git a/src/video_core/renderer_opengl/gl_driver.cpp b/src/video_core/renderer_opengl/gl_driver.cpp index ceb018f32..63b05bd85 100644 --- a/src/video_core/renderer_opengl/gl_driver.cpp +++ b/src/video_core/renderer_opengl/gl_driver.cpp @@ -5,7 +5,6 @@ #include #include "common/assert.h" #include "common/settings.h" -#include "core/telemetry_session.h" #include "video_core/custom_textures/custom_format.h" #include "video_core/renderer_opengl/gl_driver.h" #include "video_core/renderer_opengl/gl_vars.h" @@ -70,12 +69,11 @@ static void APIENTRY DebugHandler(GLenum source, GLenum type, GLuint id, GLenum level = Common::Log::Level::Debug; break; } - LOG_GENERIC(Common::Log::Class::Render_OpenGL, level, "{} {} {}: {}", GetSource(source), GetType(type), id, message); } -Driver::Driver(Core::TelemetrySession& telemetry_session_) : telemetry_session{telemetry_session_} { +Driver::Driver() { const bool enable_debug = Settings::values.renderer_debug.GetValue(); if (enable_debug) { glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS); @@ -135,12 +133,6 @@ void Driver::ReportDriverInfo() { LOG_INFO(Render_OpenGL, "GL_VERSION: {}", gl_version); LOG_INFO(Render_OpenGL, "GL_VENDOR: {}", gpu_vendor); LOG_INFO(Render_OpenGL, "GL_RENDERER: {}", gpu_model); - - // Add the information to the telemetry system - constexpr auto user_system = Common::Telemetry::FieldType::UserSystem; - telemetry_session.AddField(user_system, "GPU_Vendor", std::string{gpu_vendor}); - telemetry_session.AddField(user_system, "GPU_Model", std::string{gpu_model}); - telemetry_session.AddField(user_system, "GPU_OpenGL_Version", std::string{gl_version}); } void Driver::DeduceGLES() { diff --git a/src/video_core/renderer_opengl/gl_driver.h b/src/video_core/renderer_opengl/gl_driver.h index 430469da7..2d67c3dc9 100644 --- a/src/video_core/renderer_opengl/gl_driver.h +++ b/src/video_core/renderer_opengl/gl_driver.h @@ -7,10 +7,6 @@ #include #include "common/common_types.h" -namespace Core { -class TelemetrySession; -} - namespace VideoCore { enum class CustomPixelFormat : u32; } @@ -48,7 +44,7 @@ enum class DriverBug { */ class Driver { public: - Driver(Core::TelemetrySession& telemetry_session); + Driver(); ~Driver(); /// Returns true of the driver has a particular bug stated in the DriverBug enum @@ -143,7 +139,6 @@ private: void FindBugs(); private: - Core::TelemetrySession& telemetry_session; Vendor vendor = Vendor::Unknown; DriverBug bugs{}; bool is_suitable{}; diff --git a/src/video_core/renderer_opengl/pica_to_gl.h b/src/video_core/renderer_opengl/pica_to_gl.h index fa9409465..162610c55 100644 --- a/src/video_core/renderer_opengl/pica_to_gl.h +++ b/src/video_core/renderer_opengl/pica_to_gl.h @@ -9,7 +9,6 @@ #include "common/assert.h" #include "common/logging/log.h" #include "core/core.h" -#include "core/telemetry_session.h" #include "video_core/pica/regs_framebuffer.h" #include "video_core/pica/regs_lighting.h" #include "video_core/pica/regs_texturing.h" @@ -76,9 +75,6 @@ inline GLenum WrapMode(Pica::TexturingRegs::TextureConfig::WrapMode mode) { } if (index > 3) { - Core::System::GetInstance().TelemetrySession().AddField( - Common::Telemetry::FieldType::Session, "VideoCore_Pica_UnsupportedTextureWrapMode", - static_cast(index)); LOG_WARNING(Render_OpenGL, "Using texture wrap mode {}", index); } diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index e9423fc6d..ce6cf5386 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -75,9 +75,9 @@ static std::array MakeOrthographicMatrix(const float width, cons RendererOpenGL::RendererOpenGL(Core::System& system, Pica::PicaCore& pica_, Frontend::EmuWindow& window, Frontend::EmuWindow* secondary_window) : VideoCore::RendererBase{system, window, secondary_window}, pica{pica_}, - driver{system.TelemetrySession()}, rasterizer{system.Memory(), pica, - system.CustomTexManager(), *this, driver}, - frame_dumper{system, window} { + rasterizer{system.Memory(), pica, system.CustomTexManager(), *this, driver}, frame_dumper{ + system, + window} { const bool has_debug_tool = driver.HasDebugTool(); window.mailbox = std::make_unique(has_debug_tool); if (secondary_window) { diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index 5a18b305d..98f8b23f2 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -53,9 +53,9 @@ constexpr static std::array PRESENT_BINDINGS RendererVulkan::RendererVulkan(Core::System& system, Pica::PicaCore& pica_, Frontend::EmuWindow& window, Frontend::EmuWindow* secondary_window) : RendererBase{system, window, secondary_window}, memory{system.Memory()}, pica{pica_}, - instance{system.TelemetrySession(), window, Settings::values.physical_device.GetValue()}, - scheduler{instance}, renderpass_cache{instance, scheduler}, pool{instance}, - main_window{window, instance, scheduler}, + instance{window, Settings::values.physical_device.GetValue()}, scheduler{instance}, + renderpass_cache{instance, scheduler}, pool{instance}, main_window{window, instance, + scheduler}, vertex_buffer{instance, scheduler, vk::BufferUsageFlagBits::eVertexBuffer, VERTEX_BUFFER_SIZE}, rasterizer{memory, diff --git a/src/video_core/renderer_vulkan/vk_instance.cpp b/src/video_core/renderer_vulkan/vk_instance.cpp index c0e14e4a2..b4fde6a5c 100644 --- a/src/video_core/renderer_vulkan/vk_instance.cpp +++ b/src/video_core/renderer_vulkan/vk_instance.cpp @@ -9,7 +9,6 @@ #include "common/assert.h" #include "common/settings.h" #include "core/frontend/emu_window.h" -#include "core/telemetry_session.h" #include "video_core/custom_textures/custom_format.h" #include "video_core/renderer_vulkan/vk_instance.h" #include "video_core/renderer_vulkan/vk_platform.h" @@ -138,8 +137,7 @@ Instance::Instance(bool enable_validation, bool dump_command_buffers) enable_validation, dump_command_buffers)}, physical_devices{instance->enumeratePhysicalDevices()} {} -Instance::Instance(Core::TelemetrySession& telemetry, Frontend::EmuWindow& window, - u32 physical_device_index) +Instance::Instance(Frontend::EmuWindow& window, u32 physical_device_index) : library{OpenLibrary(&window)}, instance{CreateInstance( *library, window.GetWindowInfo().type, Settings::values.renderer_debug.GetValue(), @@ -161,10 +159,9 @@ Instance::Instance(Core::TelemetrySession& telemetry, Frontend::EmuWindow& windo VK_VERSION_MAJOR(properties.apiVersion), VK_VERSION_MINOR(properties.apiVersion))); } - CollectTelemetryParameters(telemetry); CreateDevice(); - CollectToolingInfo(); CreateFormatTable(); + CollectToolingInfo(); CreateCustomFormatTable(); CreateAttribTable(); } @@ -645,7 +642,10 @@ void Instance::CreateAllocator() { } } -void Instance::CollectTelemetryParameters(Core::TelemetrySession& telemetry) { +void Instance::CollectToolingInfo() { + if (!tooling_info) { + return; + } const vk::StructureChain property_chain = physical_device .getProperties2(); @@ -664,19 +664,6 @@ void Instance::CollectTelemetryParameters(Core::TelemetrySession& telemetry) { LOG_INFO(Render_Vulkan, "VK_DRIVER: {}", driver_name); LOG_INFO(Render_Vulkan, "VK_DEVICE: {}", model_name); LOG_INFO(Render_Vulkan, "VK_VERSION: {}", api_version); - - static constexpr auto field = Common::Telemetry::FieldType::UserSystem; - telemetry.AddField(field, "GPU_Vendor", vendor_name); - telemetry.AddField(field, "GPU_Model", model_name); - telemetry.AddField(field, "GPU_Vulkan_Driver", driver_name); - telemetry.AddField(field, "GPU_Vulkan_Version", api_version); - telemetry.AddField(field, "GPU_Vulkan_Extensions", extensions); -} - -void Instance::CollectToolingInfo() { - if (!tooling_info) { - return; - } const auto tools = physical_device.getToolPropertiesEXT(); for (const vk::PhysicalDeviceToolProperties& tool : tools) { const std::string_view name = tool.name; diff --git a/src/video_core/renderer_vulkan/vk_instance.h b/src/video_core/renderer_vulkan/vk_instance.h index 4bdadb7ca..1a01040b7 100644 --- a/src/video_core/renderer_vulkan/vk_instance.h +++ b/src/video_core/renderer_vulkan/vk_instance.h @@ -10,10 +10,6 @@ #include "video_core/rasterizer_cache/pixel_format.h" #include "video_core/renderer_vulkan/vk_platform.h" -namespace Core { -class TelemetrySession; -} - namespace Frontend { class EmuWindow; } @@ -41,8 +37,7 @@ struct FormatTraits { class Instance { public: explicit Instance(bool validation = false, bool dump_command_buffers = false); - explicit Instance(Core::TelemetrySession& telemetry, Frontend::EmuWindow& window, - u32 physical_device_index); + explicit Instance(Frontend::EmuWindow& window, u32 physical_device_index); ~Instance(); /// Returns the FormatTraits struct for the provided pixel format @@ -285,8 +280,7 @@ private: /// Creates the VMA allocator handle void CreateAllocator(); - /// Collects telemetry information from the device. - void CollectTelemetryParameters(Core::TelemetrySession& telemetry); + // Collects logging gpu info void CollectToolingInfo(); private: @@ -329,4 +323,4 @@ private: bool has_renderdoc{}; }; -} // namespace Vulkan +} // namespace Vulkan \ No newline at end of file