mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
Fix same texcache bug on DX side
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@394 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
db303de0db
commit
20d0c53781
@ -24,6 +24,9 @@ void TextureCache::TCacheEntry::Destroy()
|
|||||||
{
|
{
|
||||||
if (texture)
|
if (texture)
|
||||||
texture->Release();
|
texture->Release();
|
||||||
|
u32 *ptr = (u32*)g_VideoInitialize.pGetMemoryPointer(addr + hashoffset*4);
|
||||||
|
if (*ptr == hash)
|
||||||
|
*ptr = oldpixel;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextureCache::Init()
|
void TextureCache::Init()
|
||||||
@ -59,9 +62,6 @@ void TextureCache::Cleanup()
|
|||||||
{
|
{
|
||||||
if (!iter->second.isRenderTarget)
|
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->second.Destroy();
|
||||||
iter = textures.erase(iter);
|
iter = textures.erase(iter);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user