Move GPU state to sceDisplay, reset GPU on load.

This commit is contained in:
Unknown W. Brackets committed 2012-12-29 12:49:49 -08:00
1 parent ea9f0be28a
commit 589916fca2
4 files changed
+29 -8

No files matched your search

+14 -1
View File
@@ -109,7 +109,6 @@ void __DisplayInit() {
vCount = 0;
hCount = 0;
hCountTotal = 0;
hasSetMode = false;
lastFrameTime = 0;
InitGfxState();
@@ -133,6 +132,20 @@ void __DisplayDoState(PointerWrap &p) {
p.Do(leaveVblankEvent);
CoreTiming::RestoreRegisterEvent(leaveVblankEvent, "LeaveVBlank", &hleLeaveVblank);
p.Do(gstate);
p.Do(gstate_c);
p.Do(gpuStats);
gpu->DoState(p);
ReapplyGfxState();
if (p.mode == p.MODE_READ) {
if (hasSetMode) {
gpu->InitClear();
}
gpu->SetDisplayFramebuffer(framebuf.topaddr, framebuf.pspFramebufLinesize, framebuf.pspFramebufFormat);
}
p.DoMarker("sceDisplay");
}