mirror of
https://github.com/libretro/MesenCE.git
synced 2026-11-10 17:25:07 -10:00
* Video: Add support for VRR when in borderless fullscreen mode (Windows only) and improve frame pacing * Fixed debug stats not disappearing when unchecking option in some scenarios * Changed frame pacing graph scale/logic to show the gap between the ideal pacing and the current pacing (within +/- 2ms)
28 lines
526 B
C++
28 lines
526 B
C++
#pragma once
|
|
#include "pch.h"
|
|
|
|
class Emulator;
|
|
class DebugHud;
|
|
|
|
struct VideoStats
|
|
{
|
|
double LastFrameTime = 0;
|
|
double FrameDurations[60] = {};
|
|
uint32_t FrameDurationIndex = 0;
|
|
double MaxGap = 0;
|
|
};
|
|
|
|
class DebugStats
|
|
{
|
|
private:
|
|
VideoStats _core;
|
|
VideoStats _render;
|
|
uint32_t _skipFrames = 0;
|
|
|
|
void DrawVideoStats(int x, int y, DebugHud* hud, bool forRender, double fps);
|
|
|
|
public:
|
|
void ResetStats();
|
|
void UpdateStats(Emulator* emu, bool forRender, double frameTime);
|
|
void DisplayStats(Emulator* emu, DebugHud* hud);
|
|
}; |