Split out everying remaining from Swap

This commit is contained in:
Scott Mansell
2023-01-31 00:46:10 +13:00
parent 2a18b34a73
commit 0da69055d9
21 changed files with 182 additions and 170 deletions

View File

@ -91,6 +91,7 @@
#include "VideoCommon/Present.h"
#include "VideoCommon/RenderBase.h"
#include "VideoCommon/VideoBackendBase.h"
#include "VideoCommon/VideoEvents.h"
#ifdef ANDROID
#include "jni/AndroidCommon/IDCache.h"
@ -132,6 +133,13 @@ static thread_local bool tls_is_gpu_thread = false;
static void EmuThread(std::unique_ptr<BootParameters> boot, WindowSystemInfo wsi);
static EventHook s_frame_presented = AfterPresentEvent::Register([](auto& present_info) {
const double last_speed_denominator = g_perf_metrics.GetLastSpeedDenominator();
// The denominator should always be > 0 but if it's not, just return 1
const double last_speed = last_speed_denominator > 0.0 ? (1.0 / last_speed_denominator) : 1.0;
Core::Callback_FramePresented(last_speed);
}, "Core Frame Presented");
bool GetIsThrottlerTempDisabled()
{
return s_is_throttler_temp_disabled;