From 83b284919213daf7955a48e70df3d5e61b8256dd Mon Sep 17 00:00:00 2001 From: oioitff Date: Tue, 19 Feb 2013 19:17:15 +0800 Subject: [PATCH] pos[2] is limited between 0 and 65535 fix the black screen issue for Toaru Majutsu no Index, and Toaru Kagaku no Railgun. --- GPU/GLES/VertexDecoder.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GPU/GLES/VertexDecoder.h b/GPU/GLES/VertexDecoder.h index 243983c5ac..4235b158f8 100644 --- a/GPU/GLES/VertexDecoder.h +++ b/GPU/GLES/VertexDecoder.h @@ -192,6 +192,9 @@ public: switch (decFmt_.posfmt) { case DEC_FLOAT_3: memcpy(pos, data_ + decFmt_.posoff, 12); + // pos[2] is limited between 0 and 65535 + if (pos[2] < 0.0 || pos[2] > 65535.0) + pos[2] = 0.0; break; case DEC_S16_3: {