mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 16:49:58 -06:00
a small thread synchronization speedup for dual core mode.
it's most noticeable in games where the CPU is running behind compared to the GPU.
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user