1. This should fix Issue 1625 (Bizarre Auto Frame Limit)

Now the frame limiter yields on CPU thread, not as before on GPU thread mistakenly

2. Fixed clear of VI interrupts
   I guess VI interrupts are not used at all, because they were never cleared before

3. Made GPU thread 0% processor usage when paused whatever your active config is.
   I tried the event approach but somehow the thread resume latency is excessively long (Who can tell me why?)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4790 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
ayuanx
2010-01-07 20:01:41 +00:00
parent 64167bcb60
commit 9cbd508181
15 changed files with 141 additions and 227 deletions

View File

@ -34,6 +34,7 @@ extern u8* g_pVideoData;
namespace
{
static volatile bool fifoStateRun = false;
static volatile bool EmuRunning = false;
static u8 *videoBuffer;
static Common::Event fifo_run_event;
// STATE_TO_SAVE
@ -100,9 +101,11 @@ void Fifo_ExitLoopNonBlocking()
fifo_run_event.Set();
}
void Fifo_RunLoop()
void Fifo_RunLoop(bool run)
{
fifo_run_event.Set();
EmuRunning = run;
if (run)
fifo_run_event.Set();
}
// Description: Fifo_EnterLoop() sends data through this function.
@ -210,9 +213,7 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize)
}
CommandProcessor::SetFifoIdleFromVideoPlugin();
// "VideoFifo_CheckEFBAccess()" & "VideoFifo_CheckSwapRequest()" should be
// moved to a more suitable place than inside function "Fifo_EnterLoop()"
if (g_ActiveConfig.bEFBAccessEnable || g_ActiveConfig.bUseXFB)
if (EmuRunning)
Common::YieldCPU();
else
fifo_run_event.MsgWait();