qt: Do not refresh game directory while powered on (#1553)

This commit is contained in:
PabloMK7 2025-12-30 21:13:24 +01:00 committed by GitHub
parent e035bd3a21
commit be259fc9b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,6 +33,7 @@
#include "citra_qt/uisettings.h"
#include "common/logging/log.h"
#include "common/settings.h"
#include "core/core.h"
#include "core/file_sys/archive_extsavedata.h"
#include "core/file_sys/archive_source_sd_savedata.h"
#include "core/hle/service/am/am.h"
@ -1054,6 +1055,13 @@ const QStringList GameList::supported_file_extensions = {
};
void GameList::RefreshGameDirectory() {
// Do not scan directories when the system is powered on, it will be
// repopulated on shutdown anyways.
if (Core::System::GetInstance().IsPoweredOn()) {
return;
}
if (!UISettings::values.game_dirs.isEmpty() && current_worker != nullptr) {
LOG_INFO(Frontend, "Change detected in the applications directory. Reloading game list.");
PopulateAsync(UISettings::values.game_dirs);