diff options
| author | skidau <skidau@gmail.com> | 2014-10-03 13:31:52 +1000 |
|---|---|---|
| committer | skidau <skidau@gmail.com> | 2014-10-03 13:31:52 +1000 |
| commit | 16d3604211fd9999eb07426f2ba69c51a46e8238 (patch) | |
| tree | 9138452f7392ecac97d62bd275801801abc5b4ff /Source/Core/VideoBackends/D3D/Render.cpp | |
| parent | 6333f4183791b69d83e0ab2c12a03cbf42b73110 (diff) | |
| parent | f6c6f03cce4223e4b24adf49c918111d7e46c4ee (diff) | |
Merge pull request #1196 from RachelBryk/framecount
Add on screen frame counter.
Diffstat (limited to 'Source/Core/VideoBackends/D3D/Render.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/Render.cpp | 18 |
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); } |
