diff options
| author | ayuanx <ayuanx@gmail.com> | 2010-01-07 20:01:41 +0000 |
|---|---|---|
| committer | ayuanx <ayuanx@gmail.com> | 2010-01-07 20:01:41 +0000 |
| commit | 9cbd50818100df4b6dabeeb294206d8cb9ab3fc7 (patch) | |
| tree | 4cdf40b416dde01ffbcc33fd295c839260764c09 /Source/Core/VideoCommon/Src/Fifo.cpp | |
| parent | 64167bcb604ff20f88abd40ab28b715400b0b112 (diff) | |
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
Diffstat (limited to 'Source/Core/VideoCommon/Src/Fifo.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Src/Fifo.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/Src/Fifo.cpp b/Source/Core/VideoCommon/Src/Fifo.cpp index e87a437edc..172d6095fa 100644 --- a/Source/Core/VideoCommon/Src/Fifo.cpp +++ b/Source/Core/VideoCommon/Src/Fifo.cpp @@ -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(); |
