From: Mikko Rasa Date: Thu, 18 Sep 2014 17:42:20 +0000 (+0300) Subject: Miscellaneous fixes to ResourceManager X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=753198a93aff1b535806042ef10567331170fb9e;p=libs%2Fgl.git Miscellaneous fixes to ResourceManager --- diff --git a/source/resourcemanager.cpp b/source/resourcemanager.cpp index 8b647f31..a5c3691f 100644 --- a/source/resourcemanager.cpp +++ b/source/resourcemanager.cpp @@ -114,7 +114,7 @@ void ResourceManager::tick() { LoadingThread::State thread_state = thread.get_state(); bool check_total_size = false; - if(thread_state==LoadingThread::SYNC_PENDING) + if(thread_state==LoadingThread::SYNC_PENDING || thread_state==LoadingThread::LOAD_FINISHED) { thread.sync(); check_total_size = true; @@ -156,7 +156,7 @@ void ResourceManager::tick() if(i->second.loaded && i->second.last_usedsecond.data_size*(frame-i->second.last_used); - if(!best || impactbest_impact) { best = &i->second; best_impact = impact;