Skip to content

Commit

Permalink
Fix latest resources downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
altalk23 committed Oct 1, 2023
1 parent 238d1b7 commit 7de21d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions loader/src/hooks/LoadingLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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"
Expand Down
1 change: 1 addition & 0 deletions loader/src/loader/LoaderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 7de21d9

Please sign in to comment.