mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
rsx: set frame limiter before rsx->flip() (#1885)
This commit is contained in:
parent
59df7e7104
commit
b89961f01d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user