+/* TODO: migrate to addon.c */
+static void skateshop_autostart_loading(void){
+ if( !vg_loader_availible() ) return;
+
+ SDL_AtomicLock( &addon_system.sl_cache_using_resources );
+ for( u32 type=0; type<k_addon_type_max; type++ ){
+ struct addon_cache *cache = &addon_system.cache[type];
+
+ for( u32 id=1; id<=cache->pool.count; id++ ){
+ addon_cache_entry *entry = vg_pool_item( &cache->pool, id );
+ if( entry->state == k_addon_cache_state_load_request ){
+ SDL_AtomicUnlock( &addon_system.sl_cache_using_resources );
+ goto launch;
+ }
+ }
+ }
+ SDL_AtomicUnlock( &addon_system.sl_cache_using_resources );
+ return;
+launch: