//
// VideoOptionsLayer::updateResolution from 0x7cc6dc to 0x7cc7d4 (248 bytes)
//
// 4 xrefs:
// > VideoOptionsLayer::onResolutionPrev @ 0x7cc7e0
// > VideoOptionsLayer::onResolutionNext @ 0x7cc7ec
// > VideoOptionsLayer::init @ 0x7cd92c
// > ??> @ 0xc44b8
//
// 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 VideoOptionsLayer::updateResolution(VideoOptionsLayer *a1, int a2)
{
int v4; // w0
unsigned int v5; // w1
cocos2d::CCArray *m_availableResolutions; // x0
cocos2d::CCString *v7; // x0
GameManager *v8; // x0
cocos2d::CCLabelBMFont *m_selectedResolutionLabel; // x21
void (__fastcall *setString)(cocos2d::CCLabelBMFont *__hidden, const unsigned __int8 *); // x22
cocos2d::CCString *v11; // x0
const char *CString; // x0
int v13; // [xsp+38h] [xbp+38h]
float v14; // [xsp+40h] [xbp+40h]
float v15; // [xsp+44h] [xbp+44h]
v4 = cocos2d::CCArray::count(a1->m_availableResolutions);
if ( v4 <= a2 )
{
v5 = 0;
a2 = 0;
}
else
{
if ( a2 < 0 )
a2 = v4 - 1;
v5 = a2;
}
m_availableResolutions = a1->m_availableResolutions;
a1->m_currentResolution = a2;
v7 = cocos2d::CCArray::stringAtIndex(m_availableResolutions, v5);
v13 = cocos2d::CCString::intValue(v7);
v8 = GameManager::sharedState();
GameManager::resolutionForKey(v8, v13);
m_selectedResolutionLabel = a1->m_selectedResolutionLabel;
setString = m_selectedResolutionLabel->setString;
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%ix%i",
(const char *)(unsigned int)(int)v14,
(unsigned int)(int)v15);
CString = cocos2d::CCString::getCString(v11);
setString(m_selectedResolutionLabel, (const unsigned __int8 *)CString);
cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_selectedResolutionLabel, 100.0, 0.75, 0.0);
VideoOptionsLayer::toggleResolution(a1);
}