diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/core.cpp | 12 | ||||
-rw-r--r-- | src/core/settings.h | 7 | ||||
-rw-r--r-- | src/core/telemetry_session.cpp | 3 |
3 files changed, 18 insertions, 4 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 0240f946b..e5f299f26 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -140,8 +140,16 @@ void System::Reschedule() { System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { LOG_DEBUG(HW_Memory, "initialized OK"); - // TODO: Configuration option - cpu_core = std::make_unique<ARM_Dynarmic>(); + switch (Settings::values.cpu_core) { + case Settings::CpuCore::Unicorn: + cpu_core = std::make_unique<ARM_Unicorn>(); + break; + case Settings::CpuCore::Dynarmic: + default: + cpu_core = std::make_unique<ARM_Dynarmic>(); + break; + } + telemetry_session = std::make_unique<Core::TelemetrySession>(); CoreTiming::Init(); diff --git a/src/core/settings.h b/src/core/settings.h index 912b2c885..ebf072cff 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -72,6 +72,11 @@ static const std::array<const char*, NumAnalogs> mapping = {{ }}; } // namespace NativeAnalog +enum class CpuCore { + Unicorn, + Dynarmic, +}; + struct Values { // CheckNew3DS bool is_new_3ds; @@ -83,7 +88,7 @@ struct Values { std::string touch_device; // Core - bool use_cpu_jit; + CpuCore cpu_core; // Data Storage bool use_virtual_sd; diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index ca517ff44..f9725b590 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp @@ -156,7 +156,8 @@ TelemetrySession::TelemetrySession() { // Log user configuration information AddField(Telemetry::FieldType::UserConfig, "Audio_EnableAudioStretching", Settings::values.enable_audio_stretching); - AddField(Telemetry::FieldType::UserConfig, "Core_UseCpuJit", Settings::values.use_cpu_jit); + AddField(Telemetry::FieldType::UserConfig, "Core_CpuCore", + static_cast<int>(Settings::values.cpu_core)); AddField(Telemetry::FieldType::UserConfig, "Renderer_ResolutionFactor", Settings::values.resolution_factor); AddField(Telemetry::FieldType::UserConfig, "Renderer_ToggleFramelimit", |