diff options
| author | Marcos Vitali <marcosvitali@gmail.com> | 2011-02-13 04:10:40 +0000 |
|---|---|---|
| committer | Marcos Vitali <marcosvitali@gmail.com> | 2011-02-13 04:10:40 +0000 |
| commit | cd9ec1805aba9475447c47d488029bd840e76e5a (patch) | |
| tree | 70516686339882078c662d1efdc4e83bb5322ccd /Source | |
| parent | 05feabdb49cf4547cd016855a778ff3b2de5e40e (diff) | |
- Improve Fifo_Init() and Fifo_ExitLoop() for avoid Crashes when the emulation Start and Stop.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7159 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/VideoCommon/Src/Fifo.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/Src/Fifo.cpp b/Source/Core/VideoCommon/Src/Fifo.cpp index 08112b2986..de50dc1fad 100644 --- a/Source/Core/VideoCommon/Src/Fifo.cpp +++ b/Source/Core/VideoCommon/Src/Fifo.cpp @@ -52,8 +52,9 @@ void Fifo_DoState(PointerWrap &p) } void Fifo_Init() -{ +{ videoBuffer = (u8*)AllocateMemoryPages(FIFO_SIZE); + size = 0; fifoStateRun = false; } @@ -84,7 +85,8 @@ void Fifo_ExitLoop() { // This should break the wait loop in CPU thread CommandProcessor::fifo.bFF_GPReadEnable = false; - CommandProcessor::SetFifoIdleFromVideoPlugin(); + SCPFifoStruct &_fifo = CommandProcessor::fifo; + while(_fifo.isFifoProcesingData) Common::YieldCPU(); // Terminate GPU thread loop fifoStateRun = false; EmuRunning = true; |
