diff options
| author | Matthew Parlane <parlane@gmail.com> | 2012-12-29 17:47:52 +1300 |
|---|---|---|
| committer | Matthew Parlane <parlane@gmail.com> | 2012-12-29 17:47:52 +1300 |
| commit | 13bd235c1174f1291fedbf73f6bfd01c4dd81994 (patch) | |
| tree | 497e9a760a94efb6a69bee0a60bb1b8735152e32 /Source/Core/VideoCommon/Src/MainBase.cpp | |
| parent | de0798f4f7fb0d4010567351e34f658ab51348ef (diff) | |
| parent | e9d00bfeebb62d8b6c5627b959c9045914348775 (diff) | |
Merge branch 'master' into wii-usb
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 cb6dc7ae5b..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) { - BPReload(); + 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::Invalidate(); 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); |
