//
// VideoOptionsLayer::updateResolution from 0x52d1f0 to 0x52d294 (164 bytes)
//
// 3 xrefs:
// > VideoOptionsLayer::onResolutionPrev @ 0x52d2a6
// > VideoOptionsLayer::onResolutionNext @ 0x52d2b0
// > VideoOptionsLayer::init @ 0x5316ee
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:52:01 +0000
//
int __fastcall VideoOptionsLayer::updateResolution(cocos2d::CCArray **this, cocos2d::CCArray *a2)
{
int v4; // r0
cocos2d::CCString *v5; // r0
GameManager *v6; // r4
int v7; // r0
int v8; // r3
int v9; // r4
void (__fastcall *v10)(int, int); // r7
cocos2d::CCString *v11; // r0
int CString; // r0
float v14[2]; // [sp+4h] [bp-10h] BYREF
v4 = cocos2d::CCArray::count(*(this + 136));
if ( (int)a2 >= v4 )
{
a2 = nullptr;
}
else if ( (int)a2 < 0 )
{
a2 = (cocos2d::CCArray *)(v4 - 1);
}
*(this + 142) = a2;
v5 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(*(this + 136), (unsigned int)a2);
v6 = (GameManager *)cocos2d::CCString::intValue(v5);
v7 = GameManager::sharedState(v6);
GameManager::resolutionForKey((GameManager *)v14, v7, (int)v6, v8);
v9 = (int)*(this + 133);
v10 = *(void (__fastcall **)(int, int))(*(_DWORD *)v9 + 464);
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%ix%i",
(const char *)(int)v14[0],
(int)v14[1]);
CString = cocos2d::CCString::getCString(v11);
v10(v9, CString);
cocos2d::CCLabelBMFont::limitLabelWidth(*(this + 133), 100.0, 0.75, 0.0);
return VideoOptionsLayer::toggleResolution((VideoOptionsLayer *)this);
}