summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/Fifo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoCommon/Src/Fifo.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/Fifo.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/Src/Fifo.cpp b/Source/Core/VideoCommon/Src/Fifo.cpp
index 842ff49e78..7330169ddd 100644
--- a/Source/Core/VideoCommon/Src/Fifo.cpp
+++ b/Source/Core/VideoCommon/Src/Fifo.cpp
@@ -171,14 +171,22 @@ void RunGpuLoop()
CommandProcessor::isPossibleWaitingSetDrawDone = false;
}
- fifo.isGpuReadingData = false;
-
-
if (EmuRunningState)
- Common::YieldCPU();
+ {
+ if (fifo.isGpuReadingData)
+ {
+ fifo.isGpuReadingData = false;
+ Common::YieldCPU();
+ }
+ else
+ {
+ SLEEP(1);
+ }
+ }
else
{
// While the emu is paused, we still handle async request such as Savestates then sleep.
+ fifo.isGpuReadingData = false;
while (!EmuRunningState)
{
g_video_backend->PeekMessages();