From 252845ecb6ba1445e77a5ddabe581dbf46adba89 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Fri, 21 Dec 2012 23:54:38 +0100 Subject: [PATCH] Bugfix, remove hack --- Core/Dialog/PSPSaveDialog.cpp | 1 - Core/HLE/sceGe.cpp | 3 ++- GPU/GPUInterface.h | 2 ++ GPU/GPUState.cpp | 1 + GPU/Null/NullGpu.h | 1 + 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Core/Dialog/PSPSaveDialog.cpp b/Core/Dialog/PSPSaveDialog.cpp index a404870fc4..8136491f4a 100644 --- a/Core/Dialog/PSPSaveDialog.cpp +++ b/Core/Dialog/PSPSaveDialog.cpp @@ -33,7 +33,6 @@ PSPSaveDialog::~PSPSaveDialog() { u32 PSPSaveDialog::Init(int paramAddr) { - return 0; // Ignore if already running if (status != SCE_UTILITY_STATUS_NONE && status != SCE_UTILITY_STATUS_SHUTDOWN) { diff --git a/Core/HLE/sceGe.cpp b/Core/HLE/sceGe.cpp index 3752622f7f..8cbff40b80 100644 --- a/Core/HLE/sceGe.cpp +++ b/Core/HLE/sceGe.cpp @@ -166,7 +166,7 @@ void sceGeUnsetCallback(u32 cbID) { u32 sceGeSaveContext(u32 ctxAddr) { DEBUG_LOG(HLE, "sceGeSaveContext(%08x)", ctxAddr); - + gpu->Flush(); if (sizeof(gstate) > 512 * 4) { ERROR_LOG(HLE, "AARGH! sizeof(gstate) has grown too large!"); @@ -187,6 +187,7 @@ u32 sceGeSaveContext(u32 ctxAddr) u32 sceGeRestoreContext(u32 ctxAddr) { DEBUG_LOG(HLE, "sceGeRestoreContext(%08x)", ctxAddr); + gpu->Flush(); if (sizeof(gstate) > 512 * 4) { diff --git a/GPU/GPUInterface.h b/GPU/GPUInterface.h index be31b0c026..09773f7cf2 100644 --- a/GPU/GPUInterface.h +++ b/GPU/GPUInterface.h @@ -51,4 +51,6 @@ public: // Internal hack to avoid interrupts from "PPGe" drawing (utility UI, etc) virtual void EnableInterrupts(bool enable) = 0; + + virtual void Flush() = 0; }; diff --git a/GPU/GPUState.cpp b/GPU/GPUState.cpp index ff4e868b27..2f60deb5d6 100644 --- a/GPU/GPUState.cpp +++ b/GPU/GPUState.cpp @@ -78,6 +78,7 @@ void ReapplyGfxState() { if (!gpu) return; + gpu->Flush(); // ShaderManager_DirtyShader(); // The commands are embedded in the command memory so we can just reexecute the words. Convenient. // To be safe we pass 0xFFFFFFF as the diff. diff --git a/GPU/Null/NullGpu.h b/GPU/Null/NullGpu.h index eacee19084..93e9de9488 100644 --- a/GPU/Null/NullGpu.h +++ b/GPU/Null/NullGpu.h @@ -41,6 +41,7 @@ public: virtual void CopyDisplayToOutput() {} virtual void UpdateStats(); virtual void InvalidateCache(u32 addr, int size); + virtual void Flush() {} private: bool ProcessDLQueue();