summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/Render.cpp
diff options
context:
space:
mode:
authorRachel Bryk <RachelBryk@gmail.com>2014-09-30 18:49:44 -0400
committerRachel Bryk <RachelBryk@gmail.com>2014-09-30 18:49:44 -0400
commitf6c6f03cce4223e4b24adf49c918111d7e46c4ee (patch)
tree0950962af5d21feb1d9a095612e20ddfacd381d9 /Source/Core/VideoBackends/D3D/Render.cpp
parent13fc8e7df135e3a0c9298bb4b6ecaf6f0bacf087 (diff)
Add on screen frame counter.
Diffstat (limited to 'Source/Core/VideoBackends/D3D/Render.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D/Render.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/D3D/Render.cpp b/Source/Core/VideoBackends/D3D/Render.cpp
index 47b3fe372b..8f28379fbf 100644
--- a/Source/Core/VideoBackends/D3D/Render.cpp
+++ b/Source/Core/VideoBackends/D3D/Render.cpp
@@ -896,9 +896,23 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
D3D::context->RSSetViewports(1, &vp);
// Finish up the current frame, print some stats
- if (g_ActiveConfig.bShowFPS)
+ if (g_ActiveConfig.bShowFPS || SConfig::GetInstance().m_ShowFrameCount)
{
- std::string fps = StringFromFormat("FPS: %d\n", m_fps_counter.m_fps);
+ std::string fps = "";
+ if (g_ActiveConfig.bShowFPS)
+ fps = StringFromFormat("FPS: %d", m_fps_counter.m_fps);
+
+ if (g_ActiveConfig.bShowFPS && SConfig::GetInstance().m_ShowFrameCount)
+ fps += " - ";
+ if (SConfig::GetInstance().m_ShowFrameCount)
+ {
+ fps += StringFromFormat("Frame: %d", Movie::g_currentFrame);
+ if (Movie::IsPlayingInput())
+ fps += StringFromFormat(" / %d", Movie::g_totalFrames);
+ }
+
+ fps += "\n";
+
D3D::font.DrawTextScaled(0, 0, 20, 0.0f, 0xFF00FFFF, fps);
}