//
// GameManager::updateCustomFPS from 0x10038c9d0 to 0x10038ca91 (193 bytes)
//
// 3 xrefs:
// > LoadingLayer::loadAssets @ 0x1003a31dd
// > MoreVideoOptionsLayer::onToggle @ 0x1007a2833
// > MoreVideoOptionsLayer::onApplyFPS @ 0x1007a30c2
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall GameManager::updateCustomFPS(GameManager *a1)
{
cocos2d::CCDirector *v1; // rax
double v2; // xmm0_8
void *v3; // r14
float m_customFPSTarget; // [rsp+Ch] [rbp-14h]
if ( qword_1009A0E18 )
{
if ( !GameManager::getGameVariable((GameManager *)qword_1009A0E18, "0116") )
return;
}
else
{
v3 = operator new(0x638u);
sub_10038CE40(v3);
qword_1009A0E18 = (__int64)v3;
(*(void (__fastcall **)(void *))(*(_QWORD *)v3 + 80LL))(v3);
if ( !GameManager::getGameVariable((GameManager *)qword_1009A0E18, "0116") )
return;
}
m_customFPSTarget = a1->m_customFPSTarget;
v1 = cocos2d::CCDirector::sharedDirector();
if ( m_customFPSTarget <= 60.0 )
v2 = 0.01666666753590107;
else
v2 = (float)(1.0 / a1->m_customFPSTarget);
((void (__fastcall *)(cocos2d::CCDirector *, double))v1->setAnimationInterval)(v1, v2);
}