diff options
author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-05-18 22:06:54 +0200 |
---|---|---|
committer | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-07-21 16:56:07 +0200 |
commit | 86ed82cddefe7ec30393072db84791f9bb7dfc69 (patch) | |
tree | a38fa1ada09dc23ebb682d59ca5f74b7690f52b4 | |
parent | configure_audio: Implement ui generation (diff) | |
download | yuzu-86ed82cddefe7ec30393072db84791f9bb7dfc69.tar yuzu-86ed82cddefe7ec30393072db84791f9bb7dfc69.tar.gz yuzu-86ed82cddefe7ec30393072db84791f9bb7dfc69.tar.bz2 yuzu-86ed82cddefe7ec30393072db84791f9bb7dfc69.tar.lz yuzu-86ed82cddefe7ec30393072db84791f9bb7dfc69.tar.xz yuzu-86ed82cddefe7ec30393072db84791f9bb7dfc69.tar.zst yuzu-86ed82cddefe7ec30393072db84791f9bb7dfc69.zip |
-rw-r--r-- | src/yuzu/configuration/shared_widget.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/yuzu/configuration/shared_widget.cpp b/src/yuzu/configuration/shared_widget.cpp index d7b7ed164..4b21e5be8 100644 --- a/src/yuzu/configuration/shared_widget.cpp +++ b/src/yuzu/configuration/shared_widget.cpp @@ -124,12 +124,18 @@ void Widget::CreateCombobox(const QString& label, std::function<void()>& load_fu layout->setSpacing(6); layout->setContentsMargins(0, 0, 0, 0); - combobox->setCurrentIndex(std::stoi(setting.ToString())); - if (!managed) { return; } + // TODO: Remove audio engine specialization + if (setting.TypeId() != typeid(Settings::AudioEngine)) { + combobox->setCurrentIndex(std::stoi(setting.ToString())); + } else { + combobox->setCurrentIndex( + static_cast<u32>(Settings::ToEnum<Settings::AudioEngine>(setting.ToString()))); + } + if (Settings::IsConfiguringGlobal()) { load_func = [=]() { setting.LoadString(std::to_string(combobox->currentIndex())); }; } else { |