Core: Re-write frame limiter
Now based on std::chrono, and also works in terms of emulated time instead of frames, so we can in the future frame-limit even when the display is disabled, etc. The frame limiter can also be enabled along with v-sync now, which should be useful for those with displays running at more than 60 Hz.
This commit is contained in:
parent
b285c2a4ed
commit
fb1979d7e2
5 changed files with 53 additions and 42 deletions
|
@ -10,8 +10,8 @@
|
|||
#include "common/assert.h"
|
||||
#include "common/bit_field.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/synchronized_wrapper.h"
|
||||
#include "core/core.h"
|
||||
#include "core/core_timing.h"
|
||||
#include "core/frontend/emu_window.h"
|
||||
#include "core/hw/gpu.h"
|
||||
#include "core/hw/hw.h"
|
||||
|
@ -151,10 +151,10 @@ void RendererOpenGL::SwapBuffers() {
|
|||
render_window->PollEvents();
|
||||
render_window->SwapBuffers();
|
||||
|
||||
prev_state.Apply();
|
||||
|
||||
Core::System::GetInstance().frame_limiter.DoFrameLimiting(CoreTiming::GetGlobalTimeUs());
|
||||
Core::System::GetInstance().perf_stats.BeginSystemFrame();
|
||||
|
||||
prev_state.Apply();
|
||||
RefreshRasterizerSetting();
|
||||
|
||||
if (Pica::g_debug_context && Pica::g_debug_context->recorder) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue