mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-29 23:06:23 -05:00
yuzu: Remove CPU Jit setting from the UI
A normal user shouldn't change this, as it will slow down the emulation and can lead to bugs or crashes. The renaming is done in order to prevent users from leaving this on without a way to turn it off from the UI.
This commit is contained in:
parent
58032e0085
commit
447bdac298
11 changed files with 12 additions and 36 deletions
|
@ -53,7 +53,7 @@ bool CpuBarrier::Rendezvous() {
|
||||||
Cpu::Cpu(System& system, ExclusiveMonitor& exclusive_monitor, CpuBarrier& cpu_barrier,
|
Cpu::Cpu(System& system, ExclusiveMonitor& exclusive_monitor, CpuBarrier& cpu_barrier,
|
||||||
std::size_t core_index)
|
std::size_t core_index)
|
||||||
: cpu_barrier{cpu_barrier}, core_timing{system.CoreTiming()}, core_index{core_index} {
|
: cpu_barrier{cpu_barrier}, core_timing{system.CoreTiming()}, core_index{core_index} {
|
||||||
if (Settings::values.use_cpu_jit) {
|
if (Settings::values.cpu_jit_enabled) {
|
||||||
#ifdef ARCHITECTURE_x86_64
|
#ifdef ARCHITECTURE_x86_64
|
||||||
arm_interface = std::make_unique<ARM_Dynarmic>(system, exclusive_monitor, core_index);
|
arm_interface = std::make_unique<ARM_Dynarmic>(system, exclusive_monitor, core_index);
|
||||||
#else
|
#else
|
||||||
|
@ -70,7 +70,7 @@ Cpu::Cpu(System& system, ExclusiveMonitor& exclusive_monitor, CpuBarrier& cpu_ba
|
||||||
Cpu::~Cpu() = default;
|
Cpu::~Cpu() = default;
|
||||||
|
|
||||||
std::unique_ptr<ExclusiveMonitor> Cpu::MakeExclusiveMonitor(std::size_t num_cores) {
|
std::unique_ptr<ExclusiveMonitor> Cpu::MakeExclusiveMonitor(std::size_t num_cores) {
|
||||||
if (Settings::values.use_cpu_jit) {
|
if (Settings::values.cpu_jit_enabled) {
|
||||||
#ifdef ARCHITECTURE_x86_64
|
#ifdef ARCHITECTURE_x86_64
|
||||||
return std::make_unique<DynarmicExclusiveMonitor>(num_cores);
|
return std::make_unique<DynarmicExclusiveMonitor>(num_cores);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -85,7 +85,7 @@ void LogSettings() {
|
||||||
LogSetting("System_RngSeed", Settings::values.rng_seed.value_or(0));
|
LogSetting("System_RngSeed", Settings::values.rng_seed.value_or(0));
|
||||||
LogSetting("System_CurrentUser", Settings::values.current_user);
|
LogSetting("System_CurrentUser", Settings::values.current_user);
|
||||||
LogSetting("System_LanguageIndex", Settings::values.language_index);
|
LogSetting("System_LanguageIndex", Settings::values.language_index);
|
||||||
LogSetting("Core_UseCpuJit", Settings::values.use_cpu_jit);
|
LogSetting("Core_CpuJitEnabled", Settings::values.cpu_jit_enabled);
|
||||||
LogSetting("Core_UseMultiCore", Settings::values.use_multi_core);
|
LogSetting("Core_UseMultiCore", Settings::values.use_multi_core);
|
||||||
LogSetting("Renderer_UseResolutionFactor", Settings::values.resolution_factor);
|
LogSetting("Renderer_UseResolutionFactor", Settings::values.resolution_factor);
|
||||||
LogSetting("Renderer_UseFrameLimit", Settings::values.use_frame_limit);
|
LogSetting("Renderer_UseFrameLimit", Settings::values.use_frame_limit);
|
||||||
|
|
|
@ -378,7 +378,7 @@ struct Values {
|
||||||
std::atomic_bool is_device_reload_pending{true};
|
std::atomic_bool is_device_reload_pending{true};
|
||||||
|
|
||||||
// Core
|
// Core
|
||||||
bool use_cpu_jit;
|
bool cpu_jit_enabled;
|
||||||
bool use_multi_core;
|
bool use_multi_core;
|
||||||
|
|
||||||
// Data Storage
|
// Data Storage
|
||||||
|
|
|
@ -168,7 +168,7 @@ void TelemetrySession::AddInitialInfo(Loader::AppLoader& app_loader) {
|
||||||
AddField(Telemetry::FieldType::UserConfig, "Audio_SinkId", Settings::values.sink_id);
|
AddField(Telemetry::FieldType::UserConfig, "Audio_SinkId", Settings::values.sink_id);
|
||||||
AddField(Telemetry::FieldType::UserConfig, "Audio_EnableAudioStretching",
|
AddField(Telemetry::FieldType::UserConfig, "Audio_EnableAudioStretching",
|
||||||
Settings::values.enable_audio_stretching);
|
Settings::values.enable_audio_stretching);
|
||||||
AddField(Telemetry::FieldType::UserConfig, "Core_UseCpuJit", Settings::values.use_cpu_jit);
|
AddField(Telemetry::FieldType::UserConfig, "Core_UseCpuJit", Settings::values.cpu_jit_enabled);
|
||||||
AddField(Telemetry::FieldType::UserConfig, "Core_UseMultiCore",
|
AddField(Telemetry::FieldType::UserConfig, "Core_UseMultiCore",
|
||||||
Settings::values.use_multi_core);
|
Settings::values.use_multi_core);
|
||||||
AddField(Telemetry::FieldType::UserConfig, "Renderer_ResolutionFactor",
|
AddField(Telemetry::FieldType::UserConfig, "Renderer_ResolutionFactor",
|
||||||
|
|
|
@ -436,7 +436,8 @@ void Config::ReadControlValues() {
|
||||||
void Config::ReadCoreValues() {
|
void Config::ReadCoreValues() {
|
||||||
qt_config->beginGroup(QStringLiteral("Core"));
|
qt_config->beginGroup(QStringLiteral("Core"));
|
||||||
|
|
||||||
Settings::values.use_cpu_jit = ReadSetting(QStringLiteral("use_cpu_jit"), true).toBool();
|
Settings::values.cpu_jit_enabled =
|
||||||
|
ReadSetting(QStringLiteral("cpu_jit_enabled"), true).toBool();
|
||||||
Settings::values.use_multi_core = ReadSetting(QStringLiteral("use_multi_core"), false).toBool();
|
Settings::values.use_multi_core = ReadSetting(QStringLiteral("use_multi_core"), false).toBool();
|
||||||
|
|
||||||
qt_config->endGroup();
|
qt_config->endGroup();
|
||||||
|
@ -829,7 +830,7 @@ void Config::SaveControlValues() {
|
||||||
void Config::SaveCoreValues() {
|
void Config::SaveCoreValues() {
|
||||||
qt_config->beginGroup(QStringLiteral("Core"));
|
qt_config->beginGroup(QStringLiteral("Core"));
|
||||||
|
|
||||||
WriteSetting(QStringLiteral("use_cpu_jit"), Settings::values.use_cpu_jit, true);
|
WriteSetting(QStringLiteral("cpu_jit_enabled"), Settings::values.cpu_jit_enabled, true);
|
||||||
WriteSetting(QStringLiteral("use_multi_core"), Settings::values.use_multi_core, false);
|
WriteSetting(QStringLiteral("use_multi_core"), Settings::values.use_multi_core, false);
|
||||||
|
|
||||||
qt_config->endGroup();
|
qt_config->endGroup();
|
||||||
|
|
|
@ -22,8 +22,6 @@ ConfigureGeneral::ConfigureGeneral(QWidget* parent)
|
||||||
|
|
||||||
connect(ui->toggle_deepscan, &QCheckBox::stateChanged, this,
|
connect(ui->toggle_deepscan, &QCheckBox::stateChanged, this,
|
||||||
[] { UISettings::values.is_game_list_reload_pending.exchange(true); });
|
[] { UISettings::values.is_game_list_reload_pending.exchange(true); });
|
||||||
|
|
||||||
ui->use_cpu_jit->setEnabled(!Core::System::GetInstance().IsPoweredOn());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigureGeneral::~ConfigureGeneral() = default;
|
ConfigureGeneral::~ConfigureGeneral() = default;
|
||||||
|
@ -33,7 +31,6 @@ void ConfigureGeneral::SetConfiguration() {
|
||||||
ui->toggle_check_exit->setChecked(UISettings::values.confirm_before_closing);
|
ui->toggle_check_exit->setChecked(UISettings::values.confirm_before_closing);
|
||||||
ui->toggle_user_on_boot->setChecked(UISettings::values.select_user_on_boot);
|
ui->toggle_user_on_boot->setChecked(UISettings::values.select_user_on_boot);
|
||||||
ui->theme_combobox->setCurrentIndex(ui->theme_combobox->findData(UISettings::values.theme));
|
ui->theme_combobox->setCurrentIndex(ui->theme_combobox->findData(UISettings::values.theme));
|
||||||
ui->use_cpu_jit->setChecked(Settings::values.use_cpu_jit);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigureGeneral::ApplyConfiguration() {
|
void ConfigureGeneral::ApplyConfiguration() {
|
||||||
|
@ -42,8 +39,6 @@ void ConfigureGeneral::ApplyConfiguration() {
|
||||||
UISettings::values.select_user_on_boot = ui->toggle_user_on_boot->isChecked();
|
UISettings::values.select_user_on_boot = ui->toggle_user_on_boot->isChecked();
|
||||||
UISettings::values.theme =
|
UISettings::values.theme =
|
||||||
ui->theme_combobox->itemData(ui->theme_combobox->currentIndex()).toString();
|
ui->theme_combobox->itemData(ui->theme_combobox->currentIndex()).toString();
|
||||||
|
|
||||||
Settings::values.use_cpu_jit = ui->use_cpu_jit->isChecked();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigureGeneral::changeEvent(QEvent* event) {
|
void ConfigureGeneral::changeEvent(QEvent* event) {
|
||||||
|
|
|
@ -50,26 +50,6 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="PerformanceGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Performance</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="PerformanceHorizontalLayout">
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="PerformanceVerticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="use_cpu_jit">
|
|
||||||
<property name="text">
|
|
||||||
<string>Enable CPU JIT</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="theme_group_box">
|
<widget class="QGroupBox" name="theme_group_box">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
|
|
|
@ -340,7 +340,7 @@ void Config::ReadValues() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Core
|
// Core
|
||||||
Settings::values.use_cpu_jit = sdl2_config->GetBoolean("Core", "use_cpu_jit", true);
|
Settings::values.cpu_jit_enabled = sdl2_config->GetBoolean("Core", "cpu_jit_enabled", true);
|
||||||
Settings::values.use_multi_core = sdl2_config->GetBoolean("Core", "use_multi_core", false);
|
Settings::values.use_multi_core = sdl2_config->GetBoolean("Core", "use_multi_core", false);
|
||||||
|
|
||||||
// Renderer
|
// Renderer
|
||||||
|
|
|
@ -78,7 +78,7 @@ touch_device=
|
||||||
[Core]
|
[Core]
|
||||||
# Whether to use the Just-In-Time (JIT) compiler for CPU emulation
|
# Whether to use the Just-In-Time (JIT) compiler for CPU emulation
|
||||||
# 0: Interpreter (slow), 1 (default): JIT (fast)
|
# 0: Interpreter (slow), 1 (default): JIT (fast)
|
||||||
use_cpu_jit =
|
cpu_jit_enabled =
|
||||||
|
|
||||||
# Whether to use multi-core for CPU emulation
|
# Whether to use multi-core for CPU emulation
|
||||||
# 0 (default): Disabled, 1: Enabled
|
# 0 (default): Disabled, 1: Enabled
|
||||||
|
|
|
@ -114,7 +114,7 @@ void Config::ReadValues() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Core
|
// Core
|
||||||
Settings::values.use_cpu_jit = sdl2_config->GetBoolean("Core", "use_cpu_jit", true);
|
Settings::values.cpu_jit_enabled = sdl2_config->GetBoolean("Core", "cpu_jit_enabled", true);
|
||||||
Settings::values.use_multi_core = sdl2_config->GetBoolean("Core", "use_multi_core", false);
|
Settings::values.use_multi_core = sdl2_config->GetBoolean("Core", "use_multi_core", false);
|
||||||
|
|
||||||
// Renderer
|
// Renderer
|
||||||
|
|
|
@ -10,7 +10,7 @@ const char* sdl2_config_file = R"(
|
||||||
[Core]
|
[Core]
|
||||||
# Whether to use the Just-In-Time (JIT) compiler for CPU emulation
|
# Whether to use the Just-In-Time (JIT) compiler for CPU emulation
|
||||||
# 0: Interpreter (slow), 1 (default): JIT (fast)
|
# 0: Interpreter (slow), 1 (default): JIT (fast)
|
||||||
use_cpu_jit =
|
cpu_jit_enabled =
|
||||||
|
|
||||||
# Whether to use multi-core for CPU emulation
|
# Whether to use multi-core for CPU emulation
|
||||||
# 0 (default): Disabled, 1: Enabled
|
# 0 (default): Disabled, 1: Enabled
|
||||||
|
|
Loading…
Reference in a new issue