Fix latest resources downloading

This commit is contained in:
altalk23 2023-10-01 19:41:25 +03:00
parent 238d1b7de9
commit 7de21d9177
2 changed files with 5 additions and 0 deletions

View file

@ -57,12 +57,14 @@ struct CustomLoadingLayer : Modify<CustomLoadingLayer, LoadingLayer> {
void setupLoaderResources() {
// verify loader resources
if (!LoaderImpl::get()->verifyLoaderResources()) {
log::debug("Downloading Loader Resources");
this->setSmallText("Downloading Loader Resources");
this->addChild(EventListenerNode<ResourceDownloadFilter>::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<CustomLoadingLayer, LoadingLayer> {
));
},
[&](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"

View file

@ -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());