From b9c6f7cb89179d8ff1c878673bec528295a7605c Mon Sep 17 00:00:00 2001 From: hrydgard Date: Mon, 24 Nov 2008 19:31:49 +0000 Subject: [PATCH] Hacky fix for weird video hangs in Metroid Prime 1. May think of something better later. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1290 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/VideoCommon/Src/Fifo.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/Src/Fifo.cpp b/Source/Core/VideoCommon/Src/Fifo.cpp index 0773ed3f37..605b0aded4 100644 --- a/Source/Core/VideoCommon/Src/Fifo.cpp +++ b/Source/Core/VideoCommon/Src/Fifo.cpp @@ -110,8 +110,14 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize) Common::InterlockedExchange((int*)&_fifo.CPReadIdle, 0); #endif //video_initialize.pLog("RUN...........................",FALSE); - while(_fifo.bFF_GPReadEnable && (_fifo.CPReadWriteDistance > 0) ) + int peek_counter = 0; + while (_fifo.bFF_GPReadEnable && (_fifo.CPReadWriteDistance > 0)) { + peek_counter++; + if (peek_counter == 50) { + video_initialize.pPeekMessages(); + peek_counter = 0; + } // read the data and send it to the VideoPlugin u32 readPtr = _fifo.CPReadPointer; u8 *uData = video_initialize.pGetMemoryPointer(readPtr);