//
// SupportLayer::onLowDetail from 0x901ecc to 0x901fd4 (264 bytes)
//
// 3 xrefs:
// > ??> @ 0xb4268
// > SupportLayer::customSetup @ 0x9029b4
// > ??> @ 0x1545270
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:57:07 +0000
//
__int64 __fastcall SupportLayer::onLowDetail(SupportLayer *this, cocos2d::CCObject *a2)
{
__int64 v2; // x0
GameManager *v3; // x0
GameManager *v4; // x20
GameManager *v5; // x0
GameManager *v6; // x0
__int64 v8; // x20
__int64 v9[2]; // [xsp+20h] [xbp+20h] BYREF
void *v10; // [xsp+30h] [xbp+30h]
v2 = GameManager::sharedState(_stack_chk_guard);
v3 = (GameManager *)GameManager::unloadBackground(v2);
v4 = (GameManager *)GameManager::sharedState(v3);
v5 = (GameManager *)(*(unsigned __int8 *)(GameManager::sharedState(v4) + 925) ^ 1u);
*((_BYTE *)v4 + 925) = (_BYTE)v5;
v6 = (GameManager *)*(unsigned __int8 *)(GameManager::sharedState(v5) + 934);
if ( !(_DWORD)v6 )
{
*(_BYTE *)(GameManager::sharedState(v6) + 934) = 1;
v9[0] = 0;
v9[1] = 0;
v10 = nullptr;
std::string::__init(v9, "Low detail mode disables a lot of visual effects to increase performance.", 0x49u);
v8 = FLAlertLayer::create(
0,
(cocos2d::CCLabelBMFont *)"Low Detail Mode",
(char *)v9,
(ButtonSprite *)"OK",
nullptr,
300.0);
if ( (v9[0] & 1) != 0 )
operator delete(v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v8 + 1312LL))(v8);
}
return _stack_chk_guard;
}