Fix crash clearing the texture cache on shutdown.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2374 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard 2009-02-22 20:21:56 +00:00
parent 16584c83d1
commit 769160dfbd
5 changed files with 35 additions and 44 deletions

View file

@ -255,7 +255,7 @@ void DoState(unsigned char **ptr, int mode) {
OpenGL_MakeCurrent();
#endif
// Clear all caches that touch RAM
TextureMngr::Invalidate();
TextureMngr::Invalidate(false);
// DisplayListManager::Invalidate();
VertexLoaderManager::MarkAllDirty();
@ -306,12 +306,7 @@ void Shutdown(void)
PixelShaderManager::Shutdown();
PixelShaderCache::Shutdown();
VertexManager::Shutdown();
// This cause some kind of crash, at least in the Release build and with this setup option
// If there wasn't so little explanations and comments in this code I would be more interested
// in trying to fix this function, now I'll just leave it like this, because it works
#ifndef SETUP_FREE_VIDEO_PLUGIN_ON_BOOT
TextureMngr::Shutdown();
#endif
TextureMngr::Shutdown();
OpcodeDecoder_Shutdown();
Renderer::Shutdown();
OpenGL_Shutdown();