From 79684686c3553c34f89587de73a8d502d30455a8 Mon Sep 17 00:00:00 2001 From: zeromus Date: Tue, 5 Apr 2011 20:36:09 +0000 Subject: [PATCH] add texcache speedup patch #3275389 - be on the lookout for stale or glitched textures, but i think its safe. --- desmume/src/texcache.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/desmume/src/texcache.cpp b/desmume/src/texcache.cpp index 16d3ae64a..b99f93c26 100644 --- a/desmume/src/texcache.cpp +++ b/desmume/src/texcache.cpp @@ -302,6 +302,8 @@ public: //the texture matches params, but isnt suspected invalid. accept it. if (!curr->suspectedInvalid) return curr; + //we suspect the texture may be invalid. we need to do a byte-for-byte comparison to re-establish that it is valid: + //when the palettes dont match: //note that we are considering 4x4 textures to have a palette size of 0. //they really have a potentially HUGE palette, too big for us to handle like a normal palette, @@ -321,6 +323,7 @@ public: //REMINDER to make it primary/newest when we have smarter code //list_remove(curr); //list_push_front(curr); + curr->suspectedInvalid = false; return curr; REJECT: