From 6a122623fa46411db29f9f0eca03cdb30d0c43b6 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 24 Jan 2021 14:25:08 +1000 Subject: [PATCH] GameList: Increment progress on each file, not each load --- src/frontend-common/game_list.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontend-common/game_list.cpp b/src/frontend-common/game_list.cpp index 13d86f471..3389be33b 100644 --- a/src/frontend-common/game_list.cpp +++ b/src/frontend-common/game_list.cpp @@ -498,6 +498,8 @@ void GameList::ScanDirectory(const char* path, bool recursive, ProgressCallback* for (const FILESYSTEM_FIND_DATA& ffd : files) { + progress->IncrementProgressValue(); + // if this is a .bin, check if we have a .cue. if there is one, skip it const char* extension = std::strrchr(ffd.FileName.c_str(), '.'); if (extension && StringUtil::Strcasecmp(extension, ".bin") == 0) @@ -532,7 +534,6 @@ void GameList::ScanDirectory(const char* path, bool recursive, ProgressCallback* std::max(std::strrchr(entry_path.c_str(), '/'), std::strrchr(entry_path.c_str(), '\\')); progress->SetFormattedStatusText("Scanning '%s'...", file_part_slash ? (file_part_slash + 1) : entry_path.c_str()); - progress->IncrementProgressValue(); if (GetGameListEntry(entry_path, &entry)) {