]> git.tdb.fi Git - libs/gl.git/commitdiff
Use min_retain_frames to decide when to clear the resource load queue
authorMikko Rasa <tdb@tdb.fi>
Sat, 13 Feb 2021 11:57:23 +0000 (13:57 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 13 Feb 2021 11:57:23 +0000 (13:57 +0200)
source/resourcemanager.cpp

index 0e2d939fb489e33e315496cdd425a6cb04b4a0af..30f75013252fe2397819cb5cb5a49330e54347de 100644 (file)
@@ -217,7 +217,7 @@ void ResourceManager::dispatch_work()
 {
        queue.sort(age_order);
 
-       if(queue.front()->last_used+10<frame)
+       if(queue.front()->last_used+min_retain_frames<frame)
        {
                for(LoadQueue::iterator i=queue.begin(); i!=queue.end(); ++i)
                        (*i)->state = ManagedResource::NOT_LOADED;