summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/BPStructs.cpp
diff options
context:
space:
mode:
authorpierre <pierre@pirsoft.de>2011-07-04 13:49:40 +0000
committerpierre <pierre@pirsoft.de>2011-07-04 13:49:40 +0000
commit1f2adf056300e12bcb8608b8a5dbfcbe4b53b3fd (patch)
treecbdb3fa1165070e33ca7864ab19ab859e95b58f5 /Source/Core/VideoCommon/Src/BPStructs.cpp
parent951e20ae738d3241c9a8ea91aa5b26d642845e79 (diff)
VideoCommon: Always update pixel shader constants when tevregs change
This time, it doesn't break the games i tested, and still fixes Metroid Prime 3 texts/colors. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7668 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon/Src/BPStructs.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/BPStructs.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/Src/BPStructs.cpp b/Source/Core/VideoCommon/Src/BPStructs.cpp
index bd9e9ac5f7..42b5b2212a 100644
--- a/Source/Core/VideoCommon/Src/BPStructs.cpp
+++ b/Source/Core/VideoCommon/Src/BPStructs.cpp
@@ -553,11 +553,16 @@ void BPWritten(const BPCmd& bp)
case BPMEM_TEV_REGISTER_H+4:
case BPMEM_TEV_REGISTER_L+6: // Reg 4
case BPMEM_TEV_REGISTER_H+6:
- if (bp.address & 1) // only run this code for the _H! is this right? what if L is set independently?
+ // some games only send the _L part, so always update
+ // there actually are 2 register behind each of these
+ // addresses, selected by the type bit.
{
// don't compare with changes!
int num = (bp.address >> 1) & 0x3;
- PixelShaderManager::SetColorChanged(bpmem.tevregs[num].high.type, num);
+ if ((bp.address & 1) == 0)
+ PixelShaderManager::SetColorChanged(bpmem.tevregs[num].low.type, num, false);
+ else
+ PixelShaderManager::SetColorChanged(bpmem.tevregs[num].high.type, num, true);
}
break;