//
// SFXBrowser::onUpdateLibrary from 0x1001697b8 to 0x100169818 (96 bytes)
//
// 3 xrefs:
// > SFXBrowser::setupSFXBrowser @ 0x100169b98
// > SFXBrowser::musicActionFinished @ 0x10016a2d0
// > SFXBrowser::init @ 0x10016902c
//
// 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 SFXBrowser::onUpdateLibrary(SFXBrowser *a1, cocos2d::CCObject *a2)
{
MusicDownloadManager *v3; // x0
MusicDownloadManager *v4; // x0
MusicDownloadManager *v5; // x0
a1->m_autoUpdating = a2 == nullptr;
v3 = MusicDownloadManager::sharedState();
if ( (v3->m_customContentURL.m_data.m_short.shortStorage.__elems_[22] & 0x8000000000000000LL) != 0 )
{
if ( v3->m_customContentURL.m_data.m_long.size )
goto LABEL_3;
}
else if ( v3->m_customContentURL.m_data.m_short.shortStorage.__elems_[22] )
{
LABEL_3:
a1->m_gettingURL = 0;
v4 = MusicDownloadManager::sharedState();
MusicDownloadManager::tryUpdateSFXLibrary(v4);
return;
}
a1->m_gettingURL = 1;
v5 = MusicDownloadManager::sharedState();
MusicDownloadManager::getCustomContentURL(v5);
}