Skip to content

Commit

Permalink
implement android game::exit
Browse files Browse the repository at this point in the history
  • Loading branch information
altalk23 committed Oct 1, 2023
1 parent 8f34244 commit 238d1b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions bindings/GeometryDash.bro
Original file line number Diff line number Diff line change
Expand Up @@ -4501,6 +4501,7 @@ class MenuLayer : cocos2d::CCLayer, FLAlertLayerProtocol, GooglePlayDelegate {
void onFacebook(cocos2d::CCObject*) = win 0x191960;
void onTwitter(cocos2d::CCObject*) = win 0x191980;
void onYouTube(cocos2d::CCObject*) = win 0x1919A0;
void endGame();
static cocos2d::CCScene* scene(bool) = mac 0x1d12d0, win 0x190720, ios 0x19e57c;

cocos2d::CCSprite* m_googlePlaySprite;
Expand Down
7 changes: 5 additions & 2 deletions loader/src/platform/android/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ void geode::utils::game::launchLoaderUninstaller(bool deleteSaveData) {
}

void geode::utils::game::exit() {
// Not implemented
log::error("Exiting the game is not implemented on android");
CCDirector::get()->getActionManager()->addAction(CCSequence::create(
CCDelayTime::create(0.5f),
CCCallFunc::create(nullptr, callfunc_selector(MenuLayer::endGame)),
nullptr
), CCDirector::get()->getRunningScene(), false);;
}

void geode::utils::game::restart() {
Expand Down

0 comments on commit 238d1b7

Please sign in to comment.