From 98076f2334388f7774514dbb8a3ec3d3d7c031f9 Mon Sep 17 00:00:00 2001 From: StapleButter Date: Tue, 23 Oct 2018 20:20:38 +0200 Subject: hopefully fix all 3D-related crashes when loading savestates --- src/GPU3D.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/GPU3D.cpp b/src/GPU3D.cpp index d094537..47843e4 100644 --- a/src/GPU3D.cpp +++ b/src/GPU3D.cpp @@ -489,8 +489,12 @@ void DoSavestate(Savestate* file) ClipMatrixDirty = true; UpdateClipMatrix(); - CurVertexRAM = &VertexRAM[CurRAMBank]; - CurPolygonRAM = &PolygonRAM[CurRAMBank]; + CurVertexRAM = &VertexRAM[CurRAMBank ? 6144 : 0]; + CurPolygonRAM = &PolygonRAM[CurRAMBank ? 2048 : 0]; + + // better safe than sorry, I guess + // might cause a blank frame but atleast it won't shit itself + RenderNumPolygons = 0; } } -- cgit v1.2.3