//
// MoreVideoOptionsLayer::onApplyFPS from 0x8f8da4 to 0x8f8f68 (452 bytes)
//
// 1 xrefs:
// > ??> @ 0xf1798
//
// 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:02 +0000
//
__int64 __fastcall MoreVideoOptionsLayer::onApplyFPS(CCTextInputNode **this, cocos2d::CCObject *a2)
{
char *v3; // x0
double v4; // d0
const char *v5; // x1
cocos2d::CCString *v6; // x0
const char *v7; // x1
float v8; // s0
float v9; // s8
float v10; // s0
cocos2d::CCString *v11; // x0
char *CString; // x0
_QWORD *v13; // x21
GameManager *v14; // x0
float *v15; // x0
GameManager *v16; // x0
GameManager *v18; // [xsp+48h] [xbp+48h] BYREF
size_t v19; // [xsp+50h] [xbp+50h]
void *v20; // [xsp+58h] [xbp+58h]
GameManager *v21; // [xsp+60h] [xbp+60h] BYREF
size_t v22; // [xsp+68h] [xbp+68h]
char *v23; // [xsp+70h] [xbp+70h]
CCTextInputNode::getString(*(this + 88), (__int64 *)&v21);
v3 = (char *)&v21 + 1;
if ( ((unsigned __int8)v21 & 1) != 0 )
v3 = v23;
v4 = atof(v3);
v6 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%.03f", v5, v4);
cocos2d::CCString::floatValue(v6);
v9 = v8;
if ( ((unsigned __int8)v21 & 1) != 0 )
operator delete(v23);
if ( v9 < 60.0 )
v9 = 60.0;
v10 = floorf(v9);
v18 = nullptr;
v19 = 0;
v20 = nullptr;
if ( v9 == v10 )
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)(unsigned int)(int)v10);
else
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%.03f", v7, v9);
CString = (char *)cocos2d::CCString::getCString(v11);
std::string::assign((__int64 *)&v18, CString);
v21 = nullptr;
v22 = 0;
v23 = nullptr;
v13 = *(this + 88);
if ( ((unsigned __int8)v18 & 1) != 0 )
{
std::string::__init((__int64 *)&v21, v20, v19);
}
else
{
v23 = (char *)v20;
v21 = v18;
v22 = v19;
}
CCTextInputNode::setString(v13, (char *)&v21);
v14 = (GameManager *)(unsigned __int8)v21;
if ( ((unsigned __int8)v21 & 1) != 0 )
operator delete(v23);
v15 = (float *)GameManager::sharedState(v14);
v15[276] = v9;
v16 = (GameManager *)GameManager::sharedState((GameManager *)v15);
GameManager::updateCustomFPS(v16);
if ( ((unsigned __int8)v18 & 1) != 0 )
operator delete(v20);
return _stack_chk_guard;
}