//
// MusicBrowser::onUpdateLibrary from 0x10060ea20 to 0x10060ea8b (107 bytes)
//
// 1 xrefs:
// > MusicBrowser::init @ 0x10060e22e
//
// 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 MusicBrowser::onUpdateLibrary(MusicBrowser *a1, cocos2d::CCObject *a2)
{
MusicDownloadManager *v2; // rax
unsigned int sizex2; // ecx
MusicDownloadManager *v4; // rax
MusicDownloadManager *v5; // rax
a1->m_autoUpdating = a2 == nullptr;
v2 = MusicDownloadManager::sharedState();
sizex2 = v2->m_customContentURL.m_data.m_short.sizex2;
if ( (sizex2 & 1) != 0 )
{
if ( v2->m_customContentURL.m_data.m_long.size )
goto LABEL_3;
}
else if ( sizex2 >> 1 )
{
LABEL_3:
a1->m_gettingURL = 0;
v4 = MusicDownloadManager::sharedState();
MusicDownloadManager::tryUpdateMusicLibrary(v4);
return;
}
a1->m_gettingURL = 1;
v5 = MusicDownloadManager::sharedState();
MusicDownloadManager::getCustomContentURL(v5);
}