From 6c29abe2ef8b0ee9d55599cddcc328ea369c7e60 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Fri, 24 Apr 2009 03:59:32 +0000 Subject: [PATCH] fix existenze demo! warning: this may be a bad hack :( paging ector git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3060 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/VideoCommon/Src/VertexLoader_Color.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/Src/VertexLoader_Color.cpp b/Source/Core/VideoCommon/Src/VertexLoader_Color.cpp index 12e3ede5d3..41fcb4654a 100644 --- a/Source/Core/VideoCommon/Src/VertexLoader_Color.cpp +++ b/Source/Core/VideoCommon/Src/VertexLoader_Color.cpp @@ -22,6 +22,7 @@ #include "VideoCommon.h" #include "LookUpTables.h" #include "VertexLoader.h" +#include "VertexLoaderManager.h" #include "VertexLoader_Color.h" #include "NativeVertexWriter.h" @@ -166,7 +167,12 @@ void LOADERDECL Color_ReadIndex8_24b_6666() void LOADERDECL Color_ReadIndex8_32b_8888() { u8 Index = DataReadU8(); - const u8 *iAddress = cached_arraybases[ARRAY_COLOR+colIndex] + (Index * arraystrides[ARRAY_COLOR+colIndex]); + u8 *iAddress = cached_arraybases[ARRAY_COLOR+colIndex] + (Index * arraystrides[ARRAY_COLOR+colIndex]); + if (!iAddress) + { + RecomputeCachedArraybases(); + iAddress = cached_arraybases[ARRAY_COLOR+colIndex] + (Index * arraystrides[ARRAY_COLOR+colIndex]); + } _SetCol(_Read32(iAddress)); } //////////////////////////////////////////////////////////////////////////