diff --git a/loader/src/hooks/CCMenuItemActivateFix.cpp b/loader/src/hooks/CCMenuItemActivateFix.cpp index 7b3c34cf..75a7dacb 100644 --- a/loader/src/hooks/CCMenuItemActivateFix.cpp +++ b/loader/src/hooks/CCMenuItemActivateFix.cpp @@ -1,5 +1,6 @@ #include #include +#include using namespace geode::prelude; @@ -9,4 +10,12 @@ class $modify(CCMenuItem) { CCMenuItem::activate(); this->release(); } +}; + +class $modify(CCMenu) { + void ccTouchEnded(CCTouch* touch, CCEvent* event) { + this->retain(); + CCMenu::ccTouchEnded(touch, event); + this->release(); + } }; \ No newline at end of file