diff options
| author | 2018-03-26 23:01:40 -0400 | |
|---|---|---|
| committer | 2018-03-26 23:02:37 -0400 | |
| commit | 94f4009c3be4c7f69eda8af1cb0139dccd5bffa5 (patch) | |
| tree | 170c0dad6412df2d55594593de65460ed56b5c45 /src | |
| parent | config: Rename is_docked to use_docked_mode to be consistent with other confi... (diff) | |
| download | yuzu-94f4009c3be4c7f69eda8af1cb0139dccd5bffa5.tar.gz yuzu-94f4009c3be4c7f69eda8af1cb0139dccd5bffa5.tar.xz yuzu-94f4009c3be4c7f69eda8af1cb0139dccd5bffa5.zip | |
config: Use simplified checkbox (from Citra) for CPU JIT.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/core.cpp | 10 | ||||
| -rw-r--r-- | src/core/settings.h | 2 | ||||
| -rw-r--r-- | src/core/telemetry_session.cpp | 5 | ||||
| -rw-r--r-- | src/yuzu/configuration/config.cpp | 5 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_general.cpp | 7 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_general.ui | 41 | ||||
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 3 | ||||
| -rw-r--r-- | src/yuzu_cmd/default_ini.h | 6 |
8 files changed, 33 insertions, 46 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index d55621de8..11654d4da 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -148,19 +148,15 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { | |||
| 148 | 148 | ||
| 149 | current_process = Kernel::Process::Create("main"); | 149 | current_process = Kernel::Process::Create("main"); |
| 150 | 150 | ||
| 151 | switch (Settings::values.cpu_core) { | 151 | if (Settings::values.use_cpu_jit) { |
| 152 | case Settings::CpuCore::Unicorn: | ||
| 153 | cpu_core = std::make_shared<ARM_Unicorn>(); | ||
| 154 | break; | ||
| 155 | case Settings::CpuCore::Dynarmic: | ||
| 156 | default: | ||
| 157 | #ifdef ARCHITECTURE_x86_64 | 152 | #ifdef ARCHITECTURE_x86_64 |
| 158 | cpu_core = std::make_shared<ARM_Dynarmic>(); | 153 | cpu_core = std::make_shared<ARM_Dynarmic>(); |
| 159 | #else | 154 | #else |
| 160 | cpu_core = std::make_shared<ARM_Unicorn>(); | 155 | cpu_core = std::make_shared<ARM_Unicorn>(); |
| 161 | LOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available"); | 156 | LOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available"); |
| 162 | #endif | 157 | #endif |
| 163 | break; | 158 | } else { |
| 159 | cpu_core = std::make_shared<ARM_Unicorn>(); | ||
| 164 | } | 160 | } |
| 165 | 161 | ||
| 166 | gpu_core = std::make_unique<Tegra::GPU>(); | 162 | gpu_core = std::make_unique<Tegra::GPU>(); |
diff --git a/src/core/settings.h b/src/core/settings.h index eaef47236..fc2b8dae4 100644 --- a/src/core/settings.h +++ b/src/core/settings.h | |||
| @@ -121,7 +121,7 @@ struct Values { | |||
| 121 | std::string touch_device; | 121 | std::string touch_device; |
| 122 | 122 | ||
| 123 | // Core | 123 | // Core |
| 124 | CpuCore cpu_core; | 124 | bool use_cpu_jit; |
| 125 | 125 | ||
| 126 | // Data Storage | 126 | // Data Storage |
| 127 | bool use_virtual_sd; | 127 | bool use_virtual_sd; |
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index bea05a09b..b3ffcd443 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp | |||
| @@ -154,12 +154,13 @@ TelemetrySession::TelemetrySession() { | |||
| 154 | #endif | 154 | #endif |
| 155 | 155 | ||
| 156 | // Log user configuration information | 156 | // Log user configuration information |
| 157 | AddField(Telemetry::FieldType::UserConfig, "Core_CpuCore", | 157 | AddField(Telemetry::FieldType::UserConfig, "Core_UseCpuJit", Settings::values.use_cpu_jit); |
| 158 | static_cast<int>(Settings::values.cpu_core)); | ||
| 159 | AddField(Telemetry::FieldType::UserConfig, "Renderer_ResolutionFactor", | 158 | AddField(Telemetry::FieldType::UserConfig, "Renderer_ResolutionFactor", |
| 160 | Settings::values.resolution_factor); | 159 | Settings::values.resolution_factor); |
| 161 | AddField(Telemetry::FieldType::UserConfig, "Renderer_ToggleFramelimit", | 160 | AddField(Telemetry::FieldType::UserConfig, "Renderer_ToggleFramelimit", |
| 162 | Settings::values.toggle_framelimit); | 161 | Settings::values.toggle_framelimit); |
| 162 | AddField(Telemetry::FieldType::UserConfig, "System_UseDockedMode", | ||
| 163 | Settings::values.use_docked_mode); | ||
| 163 | } | 164 | } |
| 164 | 165 | ||
| 165 | TelemetrySession::~TelemetrySession() { | 166 | TelemetrySession::~TelemetrySession() { |
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 70035f388..4b4216eec 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp | |||
| @@ -77,8 +77,7 @@ void Config::ReadValues() { | |||
| 77 | qt_config->endGroup(); | 77 | qt_config->endGroup(); |
| 78 | 78 | ||
| 79 | qt_config->beginGroup("Core"); | 79 | qt_config->beginGroup("Core"); |
| 80 | Settings::values.cpu_core = | 80 | Settings::values.use_cpu_jit = qt_config->value("use_cpu_jit", true).toBool(); |
| 81 | static_cast<Settings::CpuCore>(qt_config->value("cpu_core", 1).toInt()); | ||
| 82 | qt_config->endGroup(); | 81 | qt_config->endGroup(); |
| 83 | 82 | ||
| 84 | qt_config->beginGroup("Renderer"); | 83 | qt_config->beginGroup("Renderer"); |
| @@ -175,7 +174,7 @@ void Config::SaveValues() { | |||
| 175 | qt_config->endGroup(); | 174 | qt_config->endGroup(); |
| 176 | 175 | ||
| 177 | qt_config->beginGroup("Core"); | 176 | qt_config->beginGroup("Core"); |
| 178 | qt_config->setValue("cpu_core", static_cast<int>(Settings::values.cpu_core)); | 177 | qt_config->setValue("use_cpu_jit", Settings::values.use_cpu_jit); |
| 179 | qt_config->endGroup(); | 178 | qt_config->endGroup(); |
| 180 | 179 | ||
| 181 | qt_config->beginGroup("Renderer"); | 180 | qt_config->beginGroup("Renderer"); |
diff --git a/src/yuzu/configuration/configure_general.cpp b/src/yuzu/configuration/configure_general.cpp index 3ddb2f4b1..616a67f9f 100644 --- a/src/yuzu/configuration/configure_general.cpp +++ b/src/yuzu/configuration/configure_general.cpp | |||
| @@ -15,7 +15,7 @@ ConfigureGeneral::ConfigureGeneral(QWidget* parent) | |||
| 15 | 15 | ||
| 16 | this->setConfiguration(); | 16 | this->setConfiguration(); |
| 17 | 17 | ||
| 18 | ui->cpu_core_combobox->setEnabled(!Core::System::GetInstance().IsPoweredOn()); | 18 | ui->use_cpu_jit->setEnabled(!Core::System::GetInstance().IsPoweredOn()); |
| 19 | ui->use_docked_mode->setEnabled(!Core::System::GetInstance().IsPoweredOn()); | 19 | ui->use_docked_mode->setEnabled(!Core::System::GetInstance().IsPoweredOn()); |
| 20 | } | 20 | } |
| 21 | 21 | ||
| @@ -24,15 +24,14 @@ ConfigureGeneral::~ConfigureGeneral() {} | |||
| 24 | void ConfigureGeneral::setConfiguration() { | 24 | void ConfigureGeneral::setConfiguration() { |
| 25 | ui->toggle_deepscan->setChecked(UISettings::values.gamedir_deepscan); | 25 | ui->toggle_deepscan->setChecked(UISettings::values.gamedir_deepscan); |
| 26 | ui->toggle_check_exit->setChecked(UISettings::values.confirm_before_closing); | 26 | ui->toggle_check_exit->setChecked(UISettings::values.confirm_before_closing); |
| 27 | ui->cpu_core_combobox->setCurrentIndex(static_cast<int>(Settings::values.cpu_core)); | 27 | ui->use_cpu_jit->setChecked(Settings::values.use_cpu_jit); |
| 28 | ui->use_docked_mode->setChecked(Settings::values.use_docked_mode); | 28 | ui->use_docked_mode->setChecked(Settings::values.use_docked_mode); |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | void ConfigureGeneral::applyConfiguration() { | 31 | void ConfigureGeneral::applyConfiguration() { |
| 32 | UISettings::values.gamedir_deepscan = ui->toggle_deepscan->isChecked(); | 32 | UISettings::values.gamedir_deepscan = ui->toggle_deepscan->isChecked(); |
| 33 | UISettings::values.confirm_before_closing = ui->toggle_check_exit->isChecked(); | 33 | UISettings::values.confirm_before_closing = ui->toggle_check_exit->isChecked(); |
| 34 | Settings::values.cpu_core = | 34 | Settings::values.use_cpu_jit = ui->use_cpu_jit->isChecked(); |
| 35 | static_cast<Settings::CpuCore>(ui->cpu_core_combobox->currentIndex()); | ||
| 36 | Settings::values.use_docked_mode = ui->use_docked_mode->isChecked(); | 35 | Settings::values.use_docked_mode = ui->use_docked_mode->isChecked(); |
| 37 | Settings::Apply(); | 36 | Settings::Apply(); |
| 38 | } | 37 | } |
diff --git a/src/yuzu/configuration/configure_general.ui b/src/yuzu/configuration/configure_general.ui index 717b1b474..5ff68f079 100644 --- a/src/yuzu/configuration/configure_general.ui +++ b/src/yuzu/configuration/configure_general.ui | |||
| @@ -44,31 +44,24 @@ | |||
| 44 | </widget> | 44 | </widget> |
| 45 | </item> | 45 | </item> |
| 46 | <item> | 46 | <item> |
| 47 | <widget class="QGroupBox" name="CpuCoreGroupBox"> | 47 | <widget class="QGroupBox" name="PerformanceGroupBox"> |
| 48 | <property name="title"> | 48 | <property name="title"> |
| 49 | <string>CPU Core</string> | 49 | <string>Performance</string> |
| 50 | </property> | 50 | </property> |
| 51 | <layout class="QHBoxLayout" name="CpuCoreHorizontalLayout"> | 51 | <layout class="QHBoxLayout" name="PerformanceHorizontalLayout"> |
| 52 | <item> | 52 | <item> |
| 53 | <layout class="QVBoxLayout" name="CpuCoreVerticalLayout"> | 53 | <layout class="QVBoxLayout" name="PerformanceVerticalLayout"> |
| 54 | <item> | 54 | <item> |
| 55 | <widget class="QComboBox" name="cpu_core_combobox"> | 55 | <widget class="QCheckBox" name="use_cpu_jit"> |
| 56 | <item> | 56 | <property name="text"> |
| 57 | <property name="text"> | 57 | <string>Enable CPU JIT</string> |
| 58 | <string>Unicorn</string> | 58 | </property> |
| 59 | </property> | 59 | </widget> |
| 60 | </item> | 60 | </item> |
| 61 | <item> | ||
| 62 | <property name="text"> | ||
| 63 | <string>Dynarmic</string> | ||
| 64 | </property> | ||
| 65 | </item> | ||
| 66 | </widget> | ||
| 67 | </item> | ||
| 68 | </layout> | ||
| 69 | </item> | ||
| 70 | </layout> | 61 | </layout> |
| 71 | </widget> | 62 | </item> |
| 63 | </layout> | ||
| 64 | </widget> | ||
| 72 | </item> | 65 | </item> |
| 73 | <item> | 66 | <item> |
| 74 | <widget class="QGroupBox" name="EmulationGroupBox"> | 67 | <widget class="QGroupBox" name="EmulationGroupBox"> |
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index b09e9fc0b..8b479bc6d 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp | |||
| @@ -90,8 +90,7 @@ void Config::ReadValues() { | |||
| 90 | sdl2_config->Get("Controls", "touch_device", "engine:emu_window"); | 90 | sdl2_config->Get("Controls", "touch_device", "engine:emu_window"); |
| 91 | 91 | ||
| 92 | // Core | 92 | // Core |
| 93 | Settings::values.cpu_core = | 93 | Settings::values.use_cpu_jit = sdl2_config->GetBoolean("Core", "use_cpu_jit", true); |
| 94 | static_cast<Settings::CpuCore>(sdl2_config->GetInteger("Core", "cpu_core", 1)); | ||
| 95 | 94 | ||
| 96 | // Renderer | 95 | // Renderer |
| 97 | Settings::values.resolution_factor = | 96 | Settings::values.resolution_factor = |
diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h index c42aba6a4..cf157bf27 100644 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h | |||
| @@ -76,9 +76,9 @@ motion_device= | |||
| 76 | touch_device= | 76 | touch_device= |
| 77 | 77 | ||
| 78 | [Core] | 78 | [Core] |
| 79 | # Which CPU core to use for CPU emulation | 79 | # Whether to use the Just-In-Time (JIT) compiler for CPU emulation |
| 80 | # 0: Unicorn (slow), 1 (default): Dynarmic (faster) | 80 | # 0: Interpreter (slow), 1 (default): JIT (fast) |
| 81 | cpu_core = | 81 | use_cpu_jit = |
| 82 | 82 | ||
| 83 | [Renderer] | 83 | [Renderer] |
| 84 | # Whether to use software or hardware rendering. | 84 | # Whether to use software or hardware rendering. |