| 241 | } |
| 242 | |
| 243 | static void GSDumpReplayerFrameLimit() |
| 244 | { |
| 245 | if (s_frame_ticks == 0) |
| 246 | return; |
| 247 | |
| 248 | // Frame limiter |
| 249 | u64 now = GetCPUTicks(); |
| 250 | const s64 ms = GetTickFrequency() / 1000; |
| 251 | const s64 sleep = s_next_frame_time - now - ms; |
| 252 | if (sleep > ms) |
| 253 | Threading::Sleep(static_cast<s32>(sleep / ms)); |
| 254 | while ((now = GetCPUTicks()) < s_next_frame_time) |
| 255 | ShortSpin(); |
| 256 | s_next_frame_time = std::max(now, s_next_frame_time + s_frame_ticks); |
| 257 | } |
| 258 | |
| 259 | void GSDumpReplayerCpuStep() |
| 260 | { |
no test coverage detected