mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-14 02:38:37 +12:00
Implemented frame limiter
Some errors in unpkg replaced with warnings
This commit is contained in:
parent
0011a50c0b
commit
969cf67ba8
8 changed files with 79 additions and 37 deletions
|
@ -335,6 +335,26 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
|||
});
|
||||
}
|
||||
|
||||
auto sync = [&]()
|
||||
{
|
||||
double limit;
|
||||
switch (Ini.GSFrameLimit.GetValue())
|
||||
{
|
||||
case 1: limit = 50.0; break;
|
||||
case 2: limit = 59.94; break;
|
||||
case 3: limit = m_fps_limit; break; //TODO
|
||||
|
||||
case 0:
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds((s64)(1000.0 / limit - m_timer_sync.GetElapsedTimeInMilliSec())));
|
||||
m_timer_sync.Start();
|
||||
};
|
||||
|
||||
sync();
|
||||
|
||||
//Emu.Pause();
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue