From 102d2545303daa926f39e5cf6518c6ce99c7918d Mon Sep 17 00:00:00 2001 From: crueter Date: Fri, 19 Jun 2026 22:55:29 +0200 Subject: [desktop] Clean up game list code, fix external watcher crash, and fix macOS flickering (#4106) - Remove unnecessary icon update code (the UI reloads this stuff anyways); test on Windows please - Cleaned up a bunch of duplicated/unused code within the game list - Fix the game list constantly reloading on macOS * When you reconstruct the entire directory list on the watcher the directoryChanged signal fires on macOS--seems like a behavioral change that occurred somewhere in the 6.8 release cycle--and it would enter an infinite loop very quickly * To fix this, only the differences between the current and old watch list are accounted for on both ends. * Since this bug is now fixed, macOS uses Qt 6.11.1 now. Should theoretically improve our situation. - Fix the external content watcher crashing; the worker would attempt to read files that didn't exist without any bounds since its cache was still pointing to that file. This supersedes and replaces #4099. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4106 Reviewed-by: Lizzie Reviewed-by: MaranBr --- src/yuzu/main_window.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/yuzu/main_window.cpp') diff --git a/src/yuzu/main_window.cpp b/src/yuzu/main_window.cpp index 0160b74e24..00b9e65c67 100644 --- a/src/yuzu/main_window.cpp +++ b/src/yuzu/main_window.cpp @@ -579,9 +579,12 @@ MainWindow::MainWindow(bool has_broken_vulkan) } else if (should_launch_qlaunch) { LaunchFirmwareApplet(u64(Service::AM::AppletProgramId::QLaunch), std::nullopt); } else if (should_launch_hlaunch) { - std::filesystem::path const sd_dir = Common::FS::GetEdenPathString(Common::FS::EdenPath::SDMCDir); + std::filesystem::path const sd_dir = + Common::FS::GetEdenPathString(Common::FS::EdenPath::SDMCDir); auto const hbl_path = (sd_dir / "atmosphere" / "hbl.nsp").string(); - BootGame(QString::fromStdString(hbl_path), LibraryAppletParameters(0x010000000000100Dull, Service::AM::AppletId::QLaunch)); + BootGame( + QString::fromStdString(hbl_path), + LibraryAppletParameters(0x010000000000100Dull, Service::AM::AppletId::QLaunch)); } } } @@ -1545,6 +1548,8 @@ void MainWindow::ConnectMenuEvents() { if (checked) { UISettings::values.game_icon_size.SetValue(size); CheckIconSize(); + + game_list->UpdateIconSizes(); game_list->RefreshGameDirectory(); } }); @@ -3363,6 +3368,7 @@ void MainWindow::ToggleShowGameName() { CheckIconSize(); + game_list->UpdateIconSizes(); game_list->RefreshGameDirectory(); } @@ -3868,6 +3874,7 @@ void MainWindow::OnGameListRefresh() { // Resets metadata cache and reloads QtCommon::Game::ResetMetadata(false); game_list->RefreshGameDirectory(); + game_list->RefreshExternalContent(); SetFirmwareVersion(); } -- cgit v1.2.3