From 00c5b8cd7d93fe2eeb1a2f2eebaa22a06656c95c Mon Sep 17 00:00:00 2001 From: "wagic.jeck" Date: Sun, 20 Sep 2009 00:39:55 +0000 Subject: [PATCH] Jeck - CACHESIZE option does something again. --- projects/mtg/src/WResourceManager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/mtg/src/WResourceManager.cpp b/projects/mtg/src/WResourceManager.cpp index 80a9060a5..6d420b3c2 100644 --- a/projects/mtg/src/WResourceManager.cpp +++ b/projects/mtg/src/WResourceManager.cpp @@ -809,6 +809,7 @@ void WResourceManager::CacheForState(int state){ textureWCache.Resize(HUGE_CACHE_LIMIT,HUGE_CACHE_ITEMS); return; #else + switch(state){ //Default is not to change cache sizes. case GAME_STATE_MENU: @@ -816,7 +817,10 @@ void WResourceManager::CacheForState(int state){ break; //Duels use a smaller cache, so there's more room for game stuff. case GAME_STATE_DUEL: - textureWCache.Resize(SMALL_CACHE_LIMIT,SMALL_CACHE_ITEMS); + if (options[Options::CACHESIZE].number) + textureWCache.Resize(LARGE_CACHE_LIMIT,LARGE_CACHE_ITEMS); + else + textureWCache.Resize(SMALL_CACHE_LIMIT,SMALL_CACHE_ITEMS); sampleWCache.Resize(SMALL_CACHE_LIMIT,MAX_CACHED_SAMPLES); ClearUnlocked(); break;