diff options
| author | degasus <wickmarkus@web.de> | 2012-12-23 13:32:23 +0100 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2012-12-23 13:32:23 +0100 |
| commit | bd0abb3d2fe5047554bb6b87fa8e3f6aa3f42e0b (patch) | |
| tree | e3fb4fbbddce310cbc3a6efed74c60cac89126e7 /Source/Core/VideoCommon/Src/MainBase.cpp | |
| parent | ffddfd8662bda4fedcfcc8cad73f02bd7a522925 (diff) | |
revert last commit, add CheckInvalidState to VideoBackend
Diffstat (limited to 'Source/Core/VideoCommon/Src/MainBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Src/MainBase.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/Src/MainBase.cpp b/Source/Core/VideoCommon/Src/MainBase.cpp index 6e0fb530db..726ef71b38 100644 --- a/Source/Core/VideoCommon/Src/MainBase.cpp +++ b/Source/Core/VideoCommon/Src/MainBase.cpp @@ -180,6 +180,7 @@ void VideoBackendHardware::InitializeShared() memset((void*)&s_beginFieldArgs, 0, sizeof(s_beginFieldArgs)); memset(&s_accessEFBArgs, 0, sizeof(s_accessEFBArgs)); s_AccessEFBResult = 0; + m_invalid = false; } // Run from the CPU thread @@ -198,16 +199,25 @@ void VideoBackendHardware::DoState(PointerWrap& p) // Refresh state. if (p.GetMode() == PointerWrap::MODE_READ) { - BPInvalidate(); + m_invalid = true; RecomputeCachedArraybases(); // Clear all caches that touch RAM // (? these don't appear to touch any emulation state that gets saved. moved to on load only.) - TextureCache::InvalidateHashes(); VertexLoaderManager::MarkAllDirty(); } } +void VideoBackendHardware::CheckInvalidState() { + if (m_invalid) + { + m_invalid = false; + + BPReload(); + TextureCache::Invalidate(); + } +} + void VideoBackendHardware::PauseAndLock(bool doLock, bool unpauseOnUnlock) { Fifo_PauseAndLock(doLock, unpauseOnUnlock); |
