From c3a8148d0e1c455b362818181f6fb22b5eb59cbb Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Sun, 19 Oct 2014 12:11:53 +0700 Subject: [PATCH] Fix DepthBufferToRDRAM::CopyToRDRAM - limit max value by 0xfffc. --- FrameBuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FrameBuffer.cpp b/FrameBuffer.cpp index 44fab249..988613a4 100644 --- a/FrameBuffer.cpp +++ b/FrameBuffer.cpp @@ -764,7 +764,7 @@ void DepthBufferToRDRAM::CopyToRDRAM( u32 address) { for (u32 y = 0; y < VI.height; ++y) { for (u32 x = 0; x < VI.width; ++x) { - col = ptr_src[x + (VI.height - y - 1)*VI.width]; + col = min((u16)0xfffc, ptr_src[x + (VI.height - y - 1)*VI.width]); ptr_dst[(x + y*VI.width)^1] = col; } }