//
// GameManager::updateCustomFPS from 0x100377440 to 0x100377501 (193 bytes)
//
// 3 xrefs:
// > LoadingLayer::loadAssets @ 0x10038c7ed
// > MoreVideoOptionsLayer::onToggle @ 0x100883943
// > MoreVideoOptionsLayer::onApplyFPS @ 0x1008841d2
//
// This function is hookable on this platform (idp: pc, 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:29:04 +0000
//
__int64 __fastcall GameManager::updateCustomFPS(__int64 a1)
{
__int64 v2; // rdi
__int64 result; // rax
__int64 v4; // rax
double v5; // xmm0_8
void *v6; // r14
float v7; // [rsp+Ch] [rbp-14h]
v2 = qword_100BE3098;
if ( qword_100BE3098 )
{
result = GameManager::getGameVariable(qword_100BE3098, "0116");
if ( !(_BYTE)result )
return result;
}
else
{
v6 = operator new(0x6B8u);
sub_100377960(v6);
qword_100BE3098 = (__int64)v6;
(*(void (__fastcall **)(void *))(*(_QWORD *)v6 + 80LL))(v6);
v2 = qword_100BE3098;
result = GameManager::getGameVariable(qword_100BE3098, "0116");
if ( !(_BYTE)result )
return result;
}
v7 = *(float *)(a1 + 1104);
v4 = cocos2d::CCDirector::sharedDirector(v2, "0116");
if ( v7 <= 60.0 )
v5 = 0.01666666753590107;
else
v5 = (float)(1.0 / *(float *)(a1 + 1104));
return (*(__int64 (__fastcall **)(__int64, double))(*(_QWORD *)v4 + 96LL))(v4, v5);
}