mirror of https://github.com/snes9xgit/snes9x.git
Don't double-wait.
This commit is contained in:
parent
f1837aa04f
commit
7f20a93637
|
@ -30,7 +30,10 @@ void Throttle::wait_for_frame()
|
||||||
auto time_to_wait = remaining();
|
auto time_to_wait = remaining();
|
||||||
|
|
||||||
if (time_to_wait < -frame_duration_us / 10)
|
if (time_to_wait < -frame_duration_us / 10)
|
||||||
|
{
|
||||||
reset();
|
reset();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (time_to_wait.count() > 2000)
|
if (time_to_wait.count() > 2000)
|
||||||
{
|
{
|
||||||
|
@ -55,7 +58,10 @@ void Throttle::wait_for_frame()
|
||||||
auto time_to_wait = remaining();
|
auto time_to_wait = remaining();
|
||||||
|
|
||||||
if (time_to_wait < -frame_duration_us / 10)
|
if (time_to_wait < -frame_duration_us / 10)
|
||||||
|
{
|
||||||
reset();
|
reset();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (time_to_wait.count() > 1000)
|
if (time_to_wait.count() > 1000)
|
||||||
std::this_thread::sleep_for(time_to_wait - 1ms);
|
std::this_thread::sleep_for(time_to_wait - 1ms);
|
||||||
|
|
Loading…
Reference in New Issue