summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2008-08-30 23:06:40 +0000
committerhrydgard <hrydgard@gmail.com>2008-08-30 23:06:40 +0000
commit20d0c537812e32b71ca3b4dda52b516b71459869 (patch)
treeea1243efb454e56e036a68324027cd2ec90d622f /Source
parentdb303de0dbd2aeba347b1d23de27d16c581f7a50 (diff)
Fix same texcache bug on DX side
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@394 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source')
-rw-r--r--Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp
index 71dd03b663..5868b90b1b 100644
--- a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp
+++ b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp
@@ -24,6 +24,9 @@ void TextureCache::TCacheEntry::Destroy()
{
if (texture)
texture->Release();
+ u32 *ptr = (u32*)g_VideoInitialize.pGetMemoryPointer(addr + hashoffset*4);
+ if (*ptr == hash)
+ *ptr = oldpixel;
}
void TextureCache::Init()
@@ -59,9 +62,6 @@ void TextureCache::Cleanup()
{
if (!iter->second.isRenderTarget)
{
- u32 *ptr = (u32*)g_VideoInitialize.pGetMemoryPointer(iter->second.addr + iter->second.hashoffset*4);
- if (*ptr == iter->second.hash)
- *ptr = iter->second.oldpixel;
iter->second.Destroy();
iter = textures.erase(iter);
}