Browse Source

refreshes metadata + list when changing external content directories. (just using RefreshMetadata does not work)

pull/2862/head
Maufeat 2 days ago
parent
commit
6bf5a4b4b4
  1. 2
      src/yuzu/configuration/configure_dialog.cpp
  2. 1
      src/yuzu/configuration/configure_dialog.h
  3. 11
      src/yuzu/configuration/configure_filesystem.cpp
  4. 3
      src/yuzu/configuration/configure_filesystem.h
  5. 2
      src/yuzu/main_window.cpp

2
src/yuzu/configuration/configure_dialog.cpp

@ -99,6 +99,8 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_,
}
});
connect(ui_tab.get(), &ConfigureUi::LanguageChanged, this, &ConfigureDialog::OnLanguageChanged);
connect(filesystem_tab.get(), &ConfigureFilesystem::ExternalContentDirsChanged, this,
&ConfigureDialog::ExternalContentDirsChanged);
connect(ui->selectorList, &QListWidget::itemSelectionChanged, this,
&ConfigureDialog::UpdateVisibleTabs);

1
src/yuzu/configuration/configure_dialog.h

@ -62,6 +62,7 @@ private slots:
signals:
void LanguageChanged(const QString& locale);
void ExternalContentDirsChanged();
private:
void changeEvent(QEvent* event) override;

11
src/yuzu/configuration/configure_filesystem.cpp

@ -107,10 +107,15 @@ void ConfigureFilesystem::ApplyConfiguration() {
UISettings::values.cache_game_list = ui->cache_game_list->isChecked();
Settings::values.external_content_dirs.clear();
std::vector<std::string> new_dirs;
new_dirs.reserve(ui->external_content_list->count());
for (int i = 0; i < ui->external_content_list->count(); ++i) {
Settings::values.external_content_dirs.push_back(
ui->external_content_list->item(i)->text().toStdString());
new_dirs.push_back(ui->external_content_list->item(i)->text().toStdString());
}
if (new_dirs != Settings::values.external_content_dirs) {
Settings::values.external_content_dirs = std::move(new_dirs);
emit ExternalContentDirsChanged();
}
}

3
src/yuzu/configuration/configure_filesystem.h

@ -24,6 +24,9 @@ public:
void ApplyConfiguration();
signals:
void ExternalContentDirsChanged();
private:
void changeEvent(QEvent* event) override;

2
src/yuzu/main_window.cpp

@ -3387,6 +3387,8 @@ void MainWindow::OnConfigure() {
!multiplayer_state->IsHostingPublicRoom());
connect(&configure_dialog, &ConfigureDialog::LanguageChanged, this,
&MainWindow::OnLanguageChanged);
connect(&configure_dialog, &ConfigureDialog::ExternalContentDirsChanged, this,
&MainWindow::OnGameListRefresh);
const auto result = configure_dialog.exec();
if (result != QDialog::Accepted && !UISettings::values.configuration_applied &&

Loading…
Cancel
Save