fix alk's commit 2

This commit is contained in:
ConfiG 2024-02-03 20:06:16 +03:00
parent b0e5588419
commit 8b302f8139
No known key found for this signature in database
GPG key ID: 44DA1983F524C11B

View file

@ -21,11 +21,9 @@ struct CustomLoadingLayer : Modify<CustomLoadingLayer, LoadingLayer> {
if (!self.setHookPriority("LoadingLayer::init", geode::node_ids::GEODE_ID_PRIORITY)) {
log::warn("Failed to set LoadingLayer::init hook priority, node IDs may not work properly");
}
GEODE_FORWARD_COMPAT_DISABLE_HOOKS_INNER("LoadingLayer stuff disabled")
GEODE_FORWARD_COMPAT_DISABLE_HOOKS_INNER("Switching to fallback custom loading layer")
}
GEODE_FORWARD_COMPAT_DISABLE_HOOKS("Switching to fallback custom loading layer")
void updateLoadedModsLabel() {
auto allMods = Loader::get()->getAllMods();
auto count = std::count_if(allMods.begin(), allMods.end(), [&](auto& item) {
@ -209,9 +207,12 @@ struct FallbackCustomLoadingLayer : Modify<FallbackCustomLoadingLayer, CCLayer>
bool init() {
if (!CCLayer::init())
return false;
if (!typeinfo_cast<LoadingLayer*>(this))
auto* self = typeinfo_cast<LoadingLayer*>(this);
if (!self)
return true;
NodeIDs::provideFor(self);
auto winSize = CCDirector::sharedDirector()->getWinSize();
auto label = CCLabelBMFont::create(