mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-08 16:01:42 +12:00
rsx: set frame limiter before rsx->flip() (#1885)
This commit is contained in:
parent
59df7e7104
commit
b89961f01d
1 changed files with 8 additions and 9 deletions
|
@ -723,6 +723,14 @@ namespace rsx
|
||||||
Emu.Pause();
|
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->gcm_current_buffer = arg;
|
||||||
rsx->flip(arg);
|
rsx->flip(arg);
|
||||||
// After each flip PS3 system is executing a routine that changes registers value to some default.
|
// 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);
|
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)
|
void user_command(thread* rsx, u32 arg)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue