rsx: set frame limiter before rsx->flip() (#1885)

This commit is contained in:
raven02 2016-07-11 21:00:04 +08:00 committed by GitHub
parent 59df7e7104
commit b89961f01d

View File

@ -723,6 +723,14 @@ namespace rsx
Emu.Pause();
}
if (double limit = g_cfg_rsx_frame_limit.get())
{
if (limit < 0) limit = rsx->fps_limit; // TODO
std::this_thread::sleep_for(std::chrono::milliseconds((s64)(1000.0 / limit - rsx->timer_sync.GetElapsedTimeInMilliSec())));
rsx->timer_sync.Start();
}
rsx->gcm_current_buffer = arg;
rsx->flip(arg);
// After each flip PS3 system is executing a routine that changes registers value to some default.
@ -740,15 +748,6 @@ namespace rsx
func(ppu, 1);
});
}
if (double limit = g_cfg_rsx_frame_limit.get())
{
if (limit < 0) limit = rsx->fps_limit; // TODO
std::this_thread::sleep_for(std::chrono::milliseconds((s64)(1000.0 / limit - rsx->timer_sync.GetElapsedTimeInMilliSec())));
rsx->timer_sync.Start();
rsx->local_transform_constants.clear();
}
}
void user_command(thread* rsx, u32 arg)