diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/telemetry_session.cpp | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index 7a2f3c90a..c26179e03 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp @@ -14,6 +14,7 @@ #include "common/logging/log.h" #include "common/settings.h" +#include "common/settings_enums.h" #include "core/file_sys/control_metadata.h" #include "core/file_sys/patch_manager.h" #include "core/loader/loader.h" @@ -61,13 +62,13 @@ static const char* TranslateRenderer(Settings::RendererBackend backend) { return "Unknown"; } -static const char* TranslateGPUAccuracyLevel(Settings::GPUAccuracy backend) { +static const char* TranslateGPUAccuracyLevel(Settings::GpuAccuracy backend) { switch (backend) { - case Settings::GPUAccuracy::Normal: + case Settings::GpuAccuracy::Normal: return "Normal"; - case Settings::GPUAccuracy::High: + case Settings::GpuAccuracy::High: return "High"; - case Settings::GPUAccuracy::Extreme: + case Settings::GpuAccuracy::Extreme: return "Extreme"; } return "Unknown"; @@ -77,9 +78,9 @@ static const char* TranslateNvdecEmulation(Settings::NvdecEmulation backend) { switch (backend) { case Settings::NvdecEmulation::Off: return "Off"; - case Settings::NvdecEmulation::CPU: + case Settings::NvdecEmulation::Cpu: return "CPU"; - case Settings::NvdecEmulation::GPU: + case Settings::NvdecEmulation::Gpu: return "GPU"; } return "Unknown"; @@ -91,14 +92,26 @@ static constexpr const char* TranslateVSyncMode(Settings::VSyncMode mode) { return "Immediate"; case Settings::VSyncMode::Mailbox: return "Mailbox"; - case Settings::VSyncMode::FIFO: + case Settings::VSyncMode::Fifo: return "FIFO"; - case Settings::VSyncMode::FIFORelaxed: + case Settings::VSyncMode::FifoRelaxed: return "FIFO Relaxed"; } return "Unknown"; } +static constexpr const char* TranslateASTCDecodeMode(Settings::AstcDecodeMode mode) { + switch (mode) { + case Settings::AstcDecodeMode::Cpu: + return "CPU"; + case Settings::AstcDecodeMode::Gpu: + return "GPU"; + case Settings::AstcDecodeMode::CpuAsynchronous: + return "CPU Asynchronous"; + } + return "Unknown"; +} + u64 GetTelemetryId() { u64 telemetry_id{}; const auto filename = Common::FS::GetYuzuPath(Common::FS::YuzuPath::ConfigDir) / "telemetry_id"; @@ -240,7 +253,8 @@ void TelemetrySession::AddInitialInfo(Loader::AppLoader& app_loader, // Log user configuration information constexpr auto field_type = Telemetry::FieldType::UserConfig; - AddField(field_type, "Audio_SinkId", Settings::values.sink_id.GetValue()); + AddField(field_type, "Audio_SinkId", + Settings::CanonicalizeEnum(Settings::values.sink_id.GetValue())); AddField(field_type, "Core_UseMultiCore", Settings::values.use_multi_core.GetValue()); AddField(field_type, "Renderer_Backend", TranslateRenderer(Settings::values.renderer_backend.GetValue())); @@ -254,14 +268,15 @@ void TelemetrySession::AddInitialInfo(Loader::AppLoader& app_loader, Settings::values.use_asynchronous_gpu_emulation.GetValue()); AddField(field_type, "Renderer_NvdecEmulation", TranslateNvdecEmulation(Settings::values.nvdec_emulation.GetValue())); - AddField(field_type, "Renderer_AccelerateASTC", Settings::values.accelerate_astc.GetValue()); + AddField(field_type, "Renderer_AccelerateASTC", + TranslateASTCDecodeMode(Settings::values.accelerate_astc.GetValue())); AddField(field_type, "Renderer_UseVsync", TranslateVSyncMode(Settings::values.vsync_mode.GetValue())); AddField(field_type, "Renderer_ShaderBackend", static_cast<u32>(Settings::values.shader_backend.GetValue())); AddField(field_type, "Renderer_UseAsynchronousShaders", Settings::values.use_asynchronous_shaders.GetValue()); - AddField(field_type, "System_UseDockedMode", Settings::values.use_docked_mode.GetValue()); + AddField(field_type, "System_UseDockedMode", Settings::IsDockedMode()); } bool TelemetrySession::SubmitTestcase() { |