From 8b70348db882a3b15a970aa427c9e31480f58979 Mon Sep 17 00:00:00 2001 From: crueter Date: Tue, 3 Feb 2026 23:39:21 -0500 Subject: [PATCH] Partial fix live refresh Recreates the ExternalContentProvider factory when factories are requested to be recreated, and also request recreate on game list refresh. Needs to be added to Android, also currently it's partially borked, see my comment. Signed-off-by: crueter --- src/core/hle/service/filesystem/filesystem.cpp | 1 + src/yuzu/game_list.cpp | 7 +++++++ src/yuzu/main_window.cpp | 3 +-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp index 700f2b46c4..2031052409 100644 --- a/src/core/hle/service/filesystem/filesystem.cpp +++ b/src/core/hle/service/filesystem/filesystem.cpp @@ -689,6 +689,7 @@ void FileSystemController::CreateFactories(FileSys::VfsFilesystem& vfs, bool ove if (overwrite) { bis_factory = nullptr; sdmc_factory = nullptr; + external_provider = nullptr; } using EdenPath = Common::FS::EdenPath; diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index 9848c564d0..993e2c8674 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp @@ -32,6 +32,7 @@ #include "yuzu/game_list_worker.h" #include "yuzu/main_window.h" #include "yuzu/util/controller_navigation.h" +#include "qt_common/qt_common.h" GameListSearchField::KeyReleaseEater::KeyReleaseEater(GameList* gamelist_, QObject* parent) : QObject(parent), gamelist{gamelist_} {} @@ -921,6 +922,12 @@ void GameList::RefreshGameDirectory() { if (!UISettings::values.game_dirs.empty() && current_worker != nullptr) { LOG_INFO(Frontend, "Change detected in the games directory. Reloading game list."); + QtCommon::system->GetFileSystemController().CreateFactories(*QtCommon::vfs); + // TODO: If you force reset metadata here, live updates to the external directories DO get tracked. + // This is not correct however. Game list metadata in general is kind of a mess, but ideally this isn't the + // behavior as-is + + // QtCommon::Game::ResetMetadata(false); PopulateAsync(UISettings::values.game_dirs); } } diff --git a/src/yuzu/main_window.cpp b/src/yuzu/main_window.cpp index d50dcad994..19b20e68eb 100644 --- a/src/yuzu/main_window.cpp +++ b/src/yuzu/main_window.cpp @@ -3903,8 +3903,7 @@ void MainWindow::OnToggleStatusBar() { statusBar()->setVisible(ui->action_Show_Status_Bar->isChecked()); } -void MainWindow::OnGameListRefresh() -{ +void MainWindow::OnGameListRefresh() { // Resets metadata cache and reloads QtCommon::Game::ResetMetadata(false); game_list->RefreshGameDirectory();