From 2ca283cf0fb2cfdfe96380a46f22258d85d6550a Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Wed, 1 Oct 2014 16:51:44 +0700 Subject: [PATCH] Call CRC_BuildTable() in TextureCache ctor. --- Textures.cpp | 4 +--- Textures.h | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Textures.cpp b/Textures.cpp index 3b26a719..e9626f0a 100644 --- a/Textures.cpp +++ b/Textures.cpp @@ -7,7 +7,6 @@ #include "gDP.h" #include "gSP.h" #include "N64.h" -#include "CRC.h" #include "convert.h" #include "FrameBuffer.h" #include "Config.h" @@ -254,8 +253,7 @@ void TextureCache::init() m_cachedBytes = m_pDummy->textureBytes; activateDummy( 0 ); activateDummy( 1 ); - - CRC_BuildTable(); + current[0] = current[1] = NULL; } void TextureCache::destroy() diff --git a/Textures.h b/Textures.h index b3a19e8b..7bc7b335 100644 --- a/Textures.h +++ b/Textures.h @@ -9,6 +9,7 @@ #include +#include "CRC.h" #include "convert.h" struct CachedTexture @@ -60,10 +61,11 @@ struct TextureCache } private: - TextureCache() : m_maxBytes(0), m_cachedBytes(0), m_hits(0), m_misses(0), m_bitDepth(0) + TextureCache() : m_pDummy(NULL), m_maxBytes(0), m_cachedBytes(0), m_hits(0), m_misses(0), m_bitDepth(0) { current[0] = NULL; current[1] = NULL; + CRC_BuildTable(); } TextureCache(const TextureCache &);