From 6323e05bd61ae4cea599d47ddd4a3ca5403dbb01 Mon Sep 17 00:00:00 2001 From: zeromus Date: Thu, 21 May 2009 14:59:19 +0000 Subject: [PATCH] gpu: ensure the thing that the assert catches, just for release builds so that people wont find subtle errors. we really need better error and info reporting facilities. --- desmume/src/GPU.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/desmume/src/GPU.cpp b/desmume/src/GPU.cpp index f0da53898..dd63c21fd 100644 --- a/desmume/src/GPU.cpp +++ b/desmume/src/GPU.cpp @@ -1341,6 +1341,9 @@ static void setFinalOBJColorSpecialDecreaseWnd(GPU *gpu, u32 passing, u8 *dst, u FORCEINLINE void GPU::setFinalColorBG(u16 color, u8 x) { assert((color&0x8000)==0); + //in order to keep release builds from creating subtle errors which we will waste time tracking down, + //lets just go ahead and do this until we have proof that we dont have to + color &= 0x7FFF; //if someone disagrees with these, they could be reimplemented as a function pointer easily bool draw=true;