diff --git a/include/openspace/rendering/loadingscreen.h b/include/openspace/rendering/loadingscreen.h index 453d12a460..0c4a300776 100644 --- a/include/openspace/rendering/loadingscreen.h +++ b/include/openspace/rendering/loadingscreen.h @@ -86,8 +86,8 @@ public: struct ProgressInfo { float progress = 0.f; - int currentSize = -1; - int totalSize = -1; + int64_t currentSize = -1; + int64_t totalSize = -1; }; void updateItem(const std::string& itemIdentifier, const std::string& itemName, diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index 22c81618b7..6c2042961e 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -723,10 +723,10 @@ void OpenSpaceEngine::loadSingleAsset(const std::string& assetPath) { progressInfo.progress = (*it)->progress(); if ((*it)->nTotalBytesIsKnown()) { - progressInfo.currentSize = static_cast( + progressInfo.currentSize = static_cast( (*it)->nSynchronizedBytes() ); - progressInfo.totalSize = static_cast( + progressInfo.totalSize = static_cast( (*it)->nTotalBytes() ); } diff --git a/src/rendering/loadingscreen.cpp b/src/rendering/loadingscreen.cpp index c4e2c9b50d..7a876ef8ab 100644 --- a/src/rendering/loadingscreen.cpp +++ b/src/rendering/loadingscreen.cpp @@ -440,11 +440,7 @@ void LoadingScreen::render() { if (info.totalSize < 1024 * 1024) { // 1MB text = fmt::format( "{} ({}%)\n{}/{} {}", - text, - p, - info.currentSize, - info.totalSize, - "bytes" + text, p, info.currentSize, info.totalSize, "bytes" ); } else { @@ -453,11 +449,7 @@ void LoadingScreen::render() { text = fmt::format( "{} ({}%)\n{:.3f}/{:.3f} {}", - text, - p, - curr, - total, - "MB" + text, p, curr, total, "MB" ); } }