diff --git a/src/object/ObjectRepository.cpp b/src/object/ObjectRepository.cpp index 78a8132cd8..a6f1c7ae9c 100644 --- a/src/object/ObjectRepository.cpp +++ b/src/object/ObjectRepository.cpp @@ -24,6 +24,7 @@ #include "../core/IStream.hpp" #include "../core/Memory.hpp" #include "../core/Path.hpp" +#include "../core/Stopwatch.hpp" #include "../core/String.hpp" #include "Object.h" #include "ObjectFactory.h" @@ -176,6 +177,11 @@ private: utf8 objectDirectory[MAX_PATH]; Path::GetDirectory(objectDirectory, sizeof(objectDirectory), gRCT2AddressObjectDataPath); + Console::WriteLine("Scanning objects..."); + + auto stopwatch = Stopwatch(); + stopwatch.Start(); + int enumFileHandle = platform_enumerate_files_begin(gRCT2AddressObjectDataPath); if (enumFileHandle != INVALID_HANDLE) { @@ -190,6 +196,9 @@ private: } platform_enumerate_files_end(enumFileHandle); } + + stopwatch.Stop(); + Console::WriteLine("Scanning complete in %.2f seconds.", stopwatch.GetElapsedMilliseconds() / 1000.0f); } void ScanObject(utf8 * path) @@ -228,7 +237,7 @@ private: } return true; } - log_info("Object repository is out of date."); + Console::WriteLine("Object repository is out of date."); return false; } catch (IOException ex) diff --git a/src/object_list.c b/src/object_list.c index 9d1a0e762e..ade4bddb87 100644 --- a/src/object_list.c +++ b/src/object_list.c @@ -247,8 +247,8 @@ bool object_load_entries(rct_object_entry* entries) // Load the obect if (!object_load_chunk(entryGroupIndex, &entries[i], NULL)) { - log_error("failed to load entry: %.8s", entries[i].name); - memcpy(gCommonFormatArgs, &entries[i], sizeof(rct_object_entry)); + // log_error("failed to load entry: %.8s", entries[i].name); + // memcpy(gCommonFormatArgs, &entries[i], sizeof(rct_object_entry)); loadFailed = true; } }