From aeb8894242e0ab952359438d3558a77f1de3f54c Mon Sep 17 00:00:00 2001 From: user666 Date: Tue, 10 Dec 2024 23:50:01 +0400 Subject: [PATCH] ok, final rc maybe --- src/_ImGui.hpp | 2 +- src/_main.cpp | 2 ++ src/special_sprites.hpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/_ImGui.hpp b/src/_ImGui.hpp index 8915215..ab732cb 100644 --- a/src/_ImGui.hpp +++ b/src/_ImGui.hpp @@ -95,7 +95,7 @@ static CCPoint toCocos(const ImVec2& pos) { #include #include -class $modify(ImGuiInit, CCDirector) { +class $modify(ImGuiCocosSetup, CCDirector) { $override void runWithScene(CCScene * pScene) { CCDirector::runWithScene(pScene); ImGuiCocos::get().setup([] {}).draw([] {}); diff --git a/src/_main.cpp b/src/_main.cpp index 6a9a6e8..b207e53 100644 --- a/src/_main.cpp +++ b/src/_main.cpp @@ -26,6 +26,7 @@ class $modify(FLAlertLayerShowupStartPointExt, CCNode) { } }; }; +#ifdef GEODE_IS_WINDOWS if (auto casted = typeinfo_cast(this)) { if (casted->getContentSize().equals(CCDirector::get()->getWinSize())) { casted->setAnchorPoint(toCocos(ImGui::GetMousePos()) / casted->getContentSize()); @@ -34,6 +35,7 @@ class $modify(FLAlertLayerShowupStartPointExt, CCNode) { } }; } +#endif }; #ifdef GEODE_IS_WINDOWS diff --git a/src/special_sprites.hpp b/src/special_sprites.hpp index f31430a..93c7b07 100644 --- a/src/special_sprites.hpp +++ b/src/special_sprites.hpp @@ -11,7 +11,7 @@ class $modify(SpecialSprites, CCSprite) { "cocos2d::CCSprite::create", "cocos2d::CCSprite::createWithSpriteFrameName", }; - for (auto name : names) if (!self.setHookPriorityPost(name, Priority::First)) { + for (auto name : names) if (!self.setHookPriorityPost(name, Priority::Last)) { log::error("Failed to set hook priority for {}.", name); } }