summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp3
-rw-r--r--src/core/perf_stats.cpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
index c42a65b36..b65d79f11 100644
--- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
@@ -4,6 +4,7 @@
4 4
5#include "common/assert.h" 5#include "common/assert.h"
6#include "common/logging/log.h" 6#include "common/logging/log.h"
7#include "core/core.h"
7#include "core/hle/service/nvdrv/devices/nvdisp_disp0.h" 8#include "core/hle/service/nvdrv/devices/nvdisp_disp0.h"
8#include "core/hle/service/nvdrv/devices/nvmap.h" 9#include "core/hle/service/nvdrv/devices/nvmap.h"
9#include "video_core/renderer_base.h" 10#include "video_core/renderer_base.h"
@@ -28,6 +29,8 @@ void nvdisp_disp0::flip(u32 buffer_handle, u32 offset, u32 format, u32 width, u3
28 using PixelFormat = RendererBase::FramebufferInfo::PixelFormat; 29 using PixelFormat = RendererBase::FramebufferInfo::PixelFormat;
29 const RendererBase::FramebufferInfo framebuffer_info{ 30 const RendererBase::FramebufferInfo framebuffer_info{
30 addr, offset, width, height, stride, static_cast<PixelFormat>(format)}; 31 addr, offset, width, height, stride, static_cast<PixelFormat>(format)};
32
33 Core::System::GetInstance().perf_stats.EndGameFrame();
31 VideoCore::g_renderer->SwapBuffers(framebuffer_info); 34 VideoCore::g_renderer->SwapBuffers(framebuffer_info);
32} 35}
33 36
diff --git a/src/core/perf_stats.cpp b/src/core/perf_stats.cpp
index 26752699e..ad3b56fcc 100644
--- a/src/core/perf_stats.cpp
+++ b/src/core/perf_stats.cpp
@@ -69,7 +69,7 @@ PerfStats::Results PerfStats::GetAndResetStats(u64 current_system_time_us) {
69double PerfStats::GetLastFrameTimeScale() { 69double PerfStats::GetLastFrameTimeScale() {
70 std::lock_guard<std::mutex> lock(object_mutex); 70 std::lock_guard<std::mutex> lock(object_mutex);
71 71
72 constexpr double FRAME_LENGTH = 1.0 / 60; // GPU::SCREEN_REFRESH_RATE; 72 constexpr double FRAME_LENGTH = 1.0 / 60;
73 return duration_cast<DoubleSecs>(previous_frame_length).count() / FRAME_LENGTH; 73 return duration_cast<DoubleSecs>(previous_frame_length).count() / FRAME_LENGTH;
74} 74}
75 75