diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp index adbfe6e360..7cb40ddfb7 100644 --- a/rpcs3/rpcs3qt/settings_dialog.cpp +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -206,17 +206,35 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std m_emu_settings->EnhanceCheckBox(ui->spuLoopDetection, emu_settings_type::SPULoopDetection); SubscribeTooltip(ui->spuLoopDetection, tooltips.settings.spu_loop_detection); - m_emu_settings->EnhanceCheckBox(ui->accurateXFloat, emu_settings_type::AccurateXFloat); - SubscribeTooltip(ui->accurateXFloat, tooltips.settings.accurate_xfloat); - - m_emu_settings->EnhanceCheckBox(ui->approximateXFloat, emu_settings_type::ApproximateXFloat); - SubscribeTooltip(ui->approximateXFloat, tooltips.settings.approximate_xfloat); - m_emu_settings->EnhanceCheckBox(ui->fullWidthAVX512, emu_settings_type::FullWidthAVX512); SubscribeTooltip(ui->fullWidthAVX512, tooltips.settings.full_width_avx512); ui->fullWidthAVX512->setEnabled(utils::has_avx512()); // Comboboxes + SubscribeTooltip(ui->gb_xfloat_accuracy, tooltips.settings.xfloat); + ui->xfloatAccuracy->addItem(tr("Accurate XFloat")); + ui->xfloatAccuracy->addItem(tr("Approximate XFloat")); + ui->xfloatAccuracy->addItem(tr("Relaxed XFloat")); + + connect(ui->xfloatAccuracy, QOverload::of(&QComboBox::currentIndexChanged), this, [this](int index) + { + if (index < 0) return; + + m_emu_settings->SetSetting(emu_settings_type::AccurateXFloat, index == 0 ? "true" : "false"); + m_emu_settings->SetSetting(emu_settings_type::ApproximateXFloat, index == 1 ? "true" : "false"); + }); + + connect(m_emu_settings.get(), &emu_settings::RestoreDefaultsSignal, this, [this]() + { + ui->xfloatAccuracy->setCurrentIndex(1); + }); + + if (m_emu_settings->GetSetting(emu_settings_type::AccurateXFloat) == "true") + ui->xfloatAccuracy->setCurrentIndex(0); + else if (m_emu_settings->GetSetting(emu_settings_type::ApproximateXFloat) == "true") + ui->xfloatAccuracy->setCurrentIndex(1); + else + ui->xfloatAccuracy->setCurrentIndex(2); m_emu_settings->EnhanceComboBox(ui->spuBlockSize, emu_settings_type::SPUBlockSize); SubscribeTooltip(ui->gb_spuBlockSize, tooltips.settings.spu_block_size); @@ -376,10 +394,10 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std case static_cast(spu_decoder_type::_static): case static_cast(spu_decoder_type::dynamic): case static_cast(spu_decoder_type::llvm): - ui->accurateXFloat->setEnabled(true); + ui->xfloatAccuracy->setEnabled(true); break; case static_cast(spu_decoder_type::asmjit): - ui->accurateXFloat->setEnabled(false); + ui->xfloatAccuracy->setEnabled(false); break; default: break; diff --git a/rpcs3/rpcs3qt/settings_dialog.ui b/rpcs3/rpcs3qt/settings_dialog.ui index 86adb12585..ce3534d9d6 100644 --- a/rpcs3/rpcs3qt/settings_dialog.ui +++ b/rpcs3/rpcs3qt/settings_dialog.ui @@ -152,6 +152,24 @@ + + + + + 0 + 0 + + + + SPU XFloat Accuracy + + + + + + + + @@ -165,20 +183,6 @@ - - - - Accurate xfloat - - - - - - - Approximate xfloat - - - diff --git a/rpcs3/rpcs3qt/tooltips.h b/rpcs3/rpcs3qt/tooltips.h index 9b5dc346a0..7a5349348a 100644 --- a/rpcs3/rpcs3qt/tooltips.h +++ b/rpcs3/rpcs3qt/tooltips.h @@ -64,8 +64,7 @@ public: const QString spu_dynamic = tr("Alternative interpreter (slow). May be faster than static interpreter. Try this if SPU Recompiler (LLVM) doesn't work."); const QString spu_asmjit = tr("Recompiles the game's SPU code using the ASMJIT Recompiler.\nThis is the fast option with very good compatibility.\nIf unsure, use this option."); const QString spu_llvm = tr("Recompiles and caches the game's SPU code using the LLVM Recompiler before running which adds extra start-up time.\nThis is the fastest option with very good compatibility.\nIf you experience issues, use the ASMJIT Recompiler."); - const QString accurate_xfloat = tr("Adds extra accuracy to SPU float vectors processing.\nFixes bugs in various games at the cost of performance.\nThis setting is only applied when SPU Decoder is set to Dynamic or LLVM."); - const QString approximate_xfloat = tr("Default accuracy for SPU float vectors processing.\nFixes bugs in various games at the cost of performance.\nThis setting is only applied when SPU Decoder is set to Dynamic or LLVM."); + const QString xfloat = tr("Control accuracy to SPU float vectors processing.\nFixes bugs in various games at the cost of performance.\nThis setting is only applied when SPU Decoder is set to Dynamic or LLVM."); const QString enable_thread_scheduler = tr("Control how RPCS3 utilizes the threads of your system.\nEach option heavily depends on the game and on your CPU. It's recommended to try each option to find out which performs the best.\nChanging the thread scheduler is not supported on CPUs with less than 12 threads."); const QString spu_loop_detection = tr("Try to detect loop conditions in SPU kernels and use them as scheduling hints.\nImproves performance and reduces CPU usage.\nMay cause severe audio stuttering in rare cases."); const QString enable_tsx = tr("Enable usage of TSX instructions.\nNeeds to be forced on some Haswell or Broadwell CPUs or CPUs with the TSX-FA instruction set.\nForcing TSX in these cases may lead to system and performance instability, use it with caution.");