From 7de21d91772c030aa703e7dbdaa472500f7d31b6 Mon Sep 17 00:00:00 2001 From: altalk23 <45172705+altalk23@users.noreply.github.com> Date: Sun, 1 Oct 2023 19:41:25 +0300 Subject: [PATCH] Fix latest resources downloading --- loader/src/hooks/LoadingLayer.cpp | 4 ++++ loader/src/loader/LoaderImpl.cpp | 1 + 2 files changed, 5 insertions(+) diff --git a/loader/src/hooks/LoadingLayer.cpp b/loader/src/hooks/LoadingLayer.cpp index 93e82f07..5bc171bb 100644 --- a/loader/src/hooks/LoadingLayer.cpp +++ b/loader/src/hooks/LoadingLayer.cpp @@ -57,12 +57,14 @@ struct CustomLoadingLayer : Modify { void setupLoaderResources() { // verify loader resources if (!LoaderImpl::get()->verifyLoaderResources()) { + log::debug("Downloading Loader Resources"); this->setSmallText("Downloading Loader Resources"); this->addChild(EventListenerNode::create( this, &CustomLoadingLayer::updateResourcesProgress )); } else { + log::debug("Loading Loader Resources"); this->setSmallText("Loading Loader Resources"); LoaderImpl::get()->updateSpecialFiles(); this->continueLoadAssets(); @@ -77,10 +79,12 @@ struct CustomLoadingLayer : Modify { )); }, [&](UpdateFinished) { + log::debug("Downloaded Loader Resources"); this->setSmallText("Downloaded Loader Resources"); this->continueLoadAssets(); }, [&](UpdateFailed const& error) { + log::debug("Failed Loader Resources"); LoaderImpl::get()->platformMessageBox( "Error updating resources", error + ".\n" diff --git a/loader/src/loader/LoaderImpl.cpp b/loader/src/loader/LoaderImpl.cpp index 44ae6c77..8c2e056d 100644 --- a/loader/src/loader/LoaderImpl.cpp +++ b/loader/src/loader/LoaderImpl.cpp @@ -814,6 +814,7 @@ void Loader::Impl::downloadLoaderResources(bool useLatestRelease) { ).post(); } ); + return; } else { log::debug("Loader version {} does not exist on Github, not downloading the resources", this->getVersion().toString());