Fifo: only sleep once within every ms of emulated time

This commit is contained in:
degasus
2015-03-13 23:36:31 +01:00
parent b020ae1c5d
commit d2c62b1744
4 changed files with 15 additions and 3 deletions

View File

@ -199,6 +199,9 @@ static void PatchEngineCallback(u64 userdata, int cyclesLate)
static void ThrottleCallback(u64 last_time, int cyclesLate)
{
// Allow the GPU thread to sleep. Setting this flag here limits the wakeups to 1 kHz.
CommandProcessor::s_gpuMaySleep.Set();
u32 time = Common::Timer::GetTimeMs();
int diff = (u32)last_time - time;