diff options
| -rw-r--r-- | src/core/core.cpp | 2 | ||||
| -rw-r--r-- | src/core/settings.cpp | 5 | ||||
| -rw-r--r-- | src/core/settings.h | 3 | ||||
| -rw-r--r-- | src/yuzu/configuration/config.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 13 |
5 files changed, 4 insertions, 21 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 0961c0819..4dc31ce66 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -159,7 +159,7 @@ struct System::Impl { | |||
| 159 | device_memory = std::make_unique<Core::DeviceMemory>(); | 159 | device_memory = std::make_unique<Core::DeviceMemory>(); |
| 160 | 160 | ||
| 161 | is_multicore = Settings::values.use_multi_core.GetValue(); | 161 | is_multicore = Settings::values.use_multi_core.GetValue(); |
| 162 | is_async_gpu = is_multicore || Settings::values.use_asynchronous_gpu_emulation.GetValue(); | 162 | is_async_gpu = Settings::values.use_asynchronous_gpu_emulation.GetValue(); |
| 163 | 163 | ||
| 164 | kernel.SetMulticore(is_multicore); | 164 | kernel.SetMulticore(is_multicore); |
| 165 | cpu_manager.SetMulticore(is_multicore); | 165 | cpu_manager.SetMulticore(is_multicore); |
diff --git a/src/core/settings.cpp b/src/core/settings.cpp index 47d9ecf9a..39306509a 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp | |||
| @@ -148,9 +148,4 @@ void RestoreGlobalState(bool is_powered_on) { | |||
| 148 | values.motion_enabled.SetGlobal(true); | 148 | values.motion_enabled.SetGlobal(true); |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | void Sanitize() { | ||
| 152 | values.use_asynchronous_gpu_emulation.SetValue( | ||
| 153 | values.use_asynchronous_gpu_emulation.GetValue() || values.use_multi_core.GetValue()); | ||
| 154 | } | ||
| 155 | |||
| 156 | } // namespace Settings | 151 | } // namespace Settings |
diff --git a/src/core/settings.h b/src/core/settings.h index d5f8d2b7e..0cd3c0c84 100644 --- a/src/core/settings.h +++ b/src/core/settings.h | |||
| @@ -257,7 +257,4 @@ void LogSettings(); | |||
| 257 | // Restore the global state of all applicable settings in the Values struct | 257 | // Restore the global state of all applicable settings in the Values struct |
| 258 | void RestoreGlobalState(bool is_powered_on); | 258 | void RestoreGlobalState(bool is_powered_on); |
| 259 | 259 | ||
| 260 | // Fixes settings that are known to cause issues with the emulator | ||
| 261 | void Sanitize(); | ||
| 262 | |||
| 263 | } // namespace Settings | 260 | } // namespace Settings |
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 9fb254986..34c2a5f8b 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp | |||
| @@ -1589,14 +1589,12 @@ void Config::WriteSettingGlobal(const QString& name, const QVariant& value, bool | |||
| 1589 | 1589 | ||
| 1590 | void Config::Reload() { | 1590 | void Config::Reload() { |
| 1591 | ReadValues(); | 1591 | ReadValues(); |
| 1592 | Settings::Sanitize(); | ||
| 1593 | // To apply default value changes | 1592 | // To apply default value changes |
| 1594 | SaveValues(); | 1593 | SaveValues(); |
| 1595 | Settings::Apply(Core::System::GetInstance()); | 1594 | Settings::Apply(Core::System::GetInstance()); |
| 1596 | } | 1595 | } |
| 1597 | 1596 | ||
| 1598 | void Config::Save() { | 1597 | void Config::Save() { |
| 1599 | Settings::Sanitize(); | ||
| 1600 | SaveValues(); | 1598 | SaveValues(); |
| 1601 | } | 1599 | } |
| 1602 | 1600 | ||
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 7aa515226..ab66d7f93 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -580,9 +580,8 @@ void GMainWindow::InitializeWidgets() { | |||
| 580 | if (emulation_running) { | 580 | if (emulation_running) { |
| 581 | return; | 581 | return; |
| 582 | } | 582 | } |
| 583 | const bool is_async = !Settings::values.use_asynchronous_gpu_emulation.GetValue() || | 583 | Settings::values.use_asynchronous_gpu_emulation.SetValue( |
| 584 | Settings::values.use_multi_core.GetValue(); | 584 | !Settings::values.use_asynchronous_gpu_emulation.GetValue()); |
| 585 | Settings::values.use_asynchronous_gpu_emulation.SetValue(is_async); | ||
| 586 | async_status_button->setChecked(Settings::values.use_asynchronous_gpu_emulation.GetValue()); | 585 | async_status_button->setChecked(Settings::values.use_asynchronous_gpu_emulation.GetValue()); |
| 587 | Settings::Apply(Core::System::GetInstance()); | 586 | Settings::Apply(Core::System::GetInstance()); |
| 588 | }); | 587 | }); |
| @@ -599,16 +598,13 @@ void GMainWindow::InitializeWidgets() { | |||
| 599 | return; | 598 | return; |
| 600 | } | 599 | } |
| 601 | Settings::values.use_multi_core.SetValue(!Settings::values.use_multi_core.GetValue()); | 600 | Settings::values.use_multi_core.SetValue(!Settings::values.use_multi_core.GetValue()); |
| 602 | const bool is_async = Settings::values.use_asynchronous_gpu_emulation.GetValue() || | ||
| 603 | Settings::values.use_multi_core.GetValue(); | ||
| 604 | Settings::values.use_asynchronous_gpu_emulation.SetValue(is_async); | ||
| 605 | async_status_button->setChecked(Settings::values.use_asynchronous_gpu_emulation.GetValue()); | ||
| 606 | multicore_status_button->setChecked(Settings::values.use_multi_core.GetValue()); | 601 | multicore_status_button->setChecked(Settings::values.use_multi_core.GetValue()); |
| 607 | Settings::Apply(Core::System::GetInstance()); | 602 | Settings::Apply(Core::System::GetInstance()); |
| 608 | }); | 603 | }); |
| 609 | multicore_status_button->setText(tr("MULTICORE")); | 604 | multicore_status_button->setText(tr("MULTICORE")); |
| 610 | multicore_status_button->setCheckable(true); | 605 | multicore_status_button->setCheckable(true); |
| 611 | multicore_status_button->setChecked(Settings::values.use_multi_core.GetValue()); | 606 | multicore_status_button->setChecked(Settings::values.use_multi_core.GetValue()); |
| 607 | |||
| 612 | statusBar()->insertPermanentWidget(0, multicore_status_button); | 608 | statusBar()->insertPermanentWidget(0, multicore_status_button); |
| 613 | statusBar()->insertPermanentWidget(0, async_status_button); | 609 | statusBar()->insertPermanentWidget(0, async_status_button); |
| 614 | 610 | ||
| @@ -2533,9 +2529,6 @@ void GMainWindow::UpdateStatusBar() { | |||
| 2533 | void GMainWindow::UpdateStatusButtons() { | 2529 | void GMainWindow::UpdateStatusButtons() { |
| 2534 | dock_status_button->setChecked(Settings::values.use_docked_mode.GetValue()); | 2530 | dock_status_button->setChecked(Settings::values.use_docked_mode.GetValue()); |
| 2535 | multicore_status_button->setChecked(Settings::values.use_multi_core.GetValue()); | 2531 | multicore_status_button->setChecked(Settings::values.use_multi_core.GetValue()); |
| 2536 | Settings::values.use_asynchronous_gpu_emulation.SetValue( | ||
| 2537 | Settings::values.use_asynchronous_gpu_emulation.GetValue() || | ||
| 2538 | Settings::values.use_multi_core.GetValue()); | ||
| 2539 | async_status_button->setChecked(Settings::values.use_asynchronous_gpu_emulation.GetValue()); | 2532 | async_status_button->setChecked(Settings::values.use_asynchronous_gpu_emulation.GetValue()); |
| 2540 | renderer_status_button->setChecked(Settings::values.renderer_backend.GetValue() == | 2533 | renderer_status_button->setChecked(Settings::values.renderer_backend.GetValue() == |
| 2541 | Settings::RendererBackend::Vulkan); | 2534 | Settings::RendererBackend::Vulkan); |