Browse Source

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 <crueter@eden-emu.dev>
pull/2862/head
crueter 5 days ago
parent
commit
8b70348db8
No known key found for this signature in database GPG Key ID: 425ACD2D4830EBC6
  1. 1
      src/core/hle/service/filesystem/filesystem.cpp
  2. 7
      src/yuzu/game_list.cpp
  3. 3
      src/yuzu/main_window.cpp

1
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;

7
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);
}
}

3
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();

Loading…
Cancel
Save