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/OGL/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/OGL/Render.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/Render.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp index 052f6c0444..ba49db732a 100644 --- a/Source/Core/VideoBackends/OGL/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Render.cpp @@ -709,8 +709,23 @@ void Renderer::DrawDebugInfo() // Draw various messages on the screen, like FPS, statistics, etc. std::string debug_info; - if (g_ActiveConfig.bShowFPS) - debug_info += StringFromFormat("FPS: %d\n", m_fps_counter.m_fps); + if (g_ActiveConfig.bShowFPS || SConfig::GetInstance().m_ShowFrameCount) + { + std::string fps = ""; + if (g_ActiveConfig.bShowFPS) + debug_info += StringFromFormat("FPS: %d", m_fps_counter.m_fps); + + if (g_ActiveConfig.bShowFPS && SConfig::GetInstance().m_ShowFrameCount) + debug_info += " - "; + if (SConfig::GetInstance().m_ShowFrameCount) + { + debug_info += StringFromFormat("Frame: %d", Movie::g_currentFrame); + if (Movie::IsPlayingInput()) + debug_info += StringFromFormat(" / %d", Movie::g_totalFrames); + } + + debug_info += "\n"; + } if (SConfig::GetInstance().m_ShowLag) debug_info += StringFromFormat("Lag: %" PRIu64 "\n", Movie::g_currentLagCount); |
