From 6d916762fb52a85aa086ef0cb6516cc63fbe775b Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Fri, 29 May 2015 18:25:19 +1200 Subject: Fix invalid pointer errors in Burnout 2. Yet another story of games loading weird shit into registers. For some reason, Burnout 2 would (in rare situations) load invalid addresses into cp_state.array_bases. What would the real hardware do in this situation? Who knows, Burnout 2 doesn't actually enable the vertex array with the invalid address so nothing kinky happens. But dolphin tries to optimise things and starts using the address as soon as it is loaded into memory. This causes GetPointer (which is now much more vocal) to throw an error. The Fix: We don't call GetPointer until we are sure the vertex array has been enabled. --- Source/Core/VideoCommon/MainBase.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'Source/Core/VideoCommon/MainBase.cpp') diff --git a/Source/Core/VideoCommon/MainBase.cpp b/Source/Core/VideoCommon/MainBase.cpp index 0b9dd58f27..96aa34de90 100644 --- a/Source/Core/VideoCommon/MainBase.cpp +++ b/Source/Core/VideoCommon/MainBase.cpp @@ -212,7 +212,6 @@ void VideoBackendHardware::DoState(PointerWrap& p) if (p.GetMode() == PointerWrap::MODE_READ) { 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.) -- cgit v1.2.3