diff options
| author | hrydgard <hrydgard@gmail.com> | 2008-10-29 22:29:25 +0000 |
|---|---|---|
| committer | hrydgard <hrydgard@gmail.com> | 2008-10-29 22:29:25 +0000 |
| commit | e36ca4705d75e419e89e8d16b4cef5be2be661d3 (patch) | |
| tree | a98f29b44528a933c200a656d8609fc0043df33c /Source | |
| parent | 39abe6a9a33f18e2d2f087080fabd81e25216941 (diff) | |
oops forgot this one
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1010 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Plugins/Plugin_VideoOGL/Src/BPStructs.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/BPStructs.cpp b/Source/Plugins/Plugin_VideoOGL/Src/BPStructs.cpp index 0a8ada081a..dba58bc0d8 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/BPStructs.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/BPStructs.cpp @@ -506,7 +506,6 @@ void BPWritten(int addr, int changes, int newval) }
if (bpmem.zmode.updateenable && nRestoreZBufferTarget) { // have to clear the target zbuffer
-
glDrawBuffer(GL_COLOR_ATTACHMENT1_EXT);
GL_REPORT_ERRORD();
glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE);
@@ -537,12 +536,19 @@ void BPWritten(int addr, int changes, int newval) VertexManager::Flush();
((u32*)&bpmem)[addr] = newval;
- u32 tlutTMemAddr = (newval&0x3FF)<<9;
- u32 tlutXferCount = (newval&0x1FFC00)>>5;
- //do the transfer!!
- u8 *ptr = g_VideoInitialize.pGetMemoryPointer((bpmem.tlutXferSrc)<<5);
+ u32 tlutTMemAddr = (newval & 0x3FF) << 9;
+ u32 tlutXferCount = (newval & 0x1FFC00) >> 5;
+
+ u8 *ptr = 0;
+ // TODO - figure out a cleaner way.
+ if (g_VideoInitialize.bWii)
+ ptr = g_VideoInitialize.pGetMemoryPointer(bpmem.tlutXferSrc << 5);
+ else
+ ptr = g_VideoInitialize.pGetMemoryPointer((bpmem.tlutXferSrc & 0xFFFFF) << 5);
if (ptr)
memcpy_gc(texMem + tlutTMemAddr, ptr, tlutXferCount);
+ else
+ PanicAlert("Invalid palette pointer %08x %08x %08x", bpmem.tlutXferSrc, bpmem.tlutXferSrc << 5, (bpmem.tlutXferSrc & 0xFFFFF)<< 5);
// TODO(ector) : kill all textures that use this palette
// Not sure if it's a good idea, though. For now, we hash texture palettes
}
|
