From 39bb4bcc41ca5e6833403b90e0b5e3dc144cb127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Fri, 24 Nov 2017 09:07:00 +0100 Subject: [PATCH] Report indexing progress --- src/openrct2/core/FileIndex.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/openrct2/core/FileIndex.hpp b/src/openrct2/core/FileIndex.hpp index c133916109..65bf96b9fe 100644 --- a/src/openrct2/core/FileIndex.hpp +++ b/src/openrct2/core/FileIndex.hpp @@ -183,8 +183,12 @@ private: Console::WriteLine("Building %s (%zu items)", _name.c_str(), scanResult.Files.size()); auto startTime = std::chrono::high_resolution_clock::now(); + // Start at 1, so that we can reach 100% completion status + size_t i = 1; for (auto filePath : scanResult.Files) { + Console::WriteFormat("File %4d of %d, done %3d%%\r", i, scanResult.Files.size(), i * 100 / scanResult.Files.size()); + i++; log_verbose("FileIndex:Indexing '%s'", filePath.c_str()); auto item = Create(filePath); if (std::get<0>(item)) @@ -192,6 +196,7 @@ private: items.push_back(std::get<1>(item)); } } + Console::WriteLine(); WriteIndexFile(scanResult.Stats, items);