mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
VideoCommon: merge debug info generators
This commit is contained in:
@ -12,14 +12,12 @@
|
||||
#include "Common/Atomic.h"
|
||||
#include "Common/CommonPaths.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/Profiler.h"
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Common/Thread.h"
|
||||
#include "Common/Timer.h"
|
||||
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Movie.h"
|
||||
|
||||
#include "VideoBackends/OGL/BoundingBox.h"
|
||||
#include "VideoBackends/OGL/FramebufferManager.h"
|
||||
@ -729,35 +727,6 @@ void Renderer::DrawDebugInfo()
|
||||
// Reset viewport for drawing text
|
||||
glViewport(0, 0, GLInterface->GetBackBufferWidth(), GLInterface->GetBackBufferHeight());
|
||||
|
||||
// Draw various messages on the screen, like FPS, statistics, etc.
|
||||
std::string debug_info;
|
||||
|
||||
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: %llu", (unsigned long long) Movie::g_currentFrame);
|
||||
if (Movie::IsPlayingInput())
|
||||
debug_info += StringFromFormat(" / %llu", (unsigned long long) Movie::g_totalFrames);
|
||||
}
|
||||
|
||||
debug_info += "\n";
|
||||
}
|
||||
|
||||
if (SConfig::GetInstance().m_ShowLag)
|
||||
debug_info += StringFromFormat("Lag: %" PRIu64 "\n", Movie::g_currentLagCount);
|
||||
|
||||
if (SConfig::GetInstance().m_ShowInputDisplay)
|
||||
debug_info += Movie::GetInputDisplay();
|
||||
|
||||
debug_info += Profiler::ToString();
|
||||
|
||||
if (GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGL && g_ActiveConfig.bShowEFBCopyRegions)
|
||||
{
|
||||
// Set Line Size
|
||||
@ -876,12 +845,7 @@ void Renderer::DrawDebugInfo()
|
||||
stats.efb_regions.clear();
|
||||
}
|
||||
|
||||
if (g_ActiveConfig.bOverlayStats)
|
||||
debug_info += Statistics::ToString();
|
||||
|
||||
if (g_ActiveConfig.bOverlayProjStats)
|
||||
debug_info += Statistics::ToStringProj();
|
||||
|
||||
std::string debug_info = GetDebugText();
|
||||
if (!debug_info.empty())
|
||||
{
|
||||
// Render a shadow, and then the text.
|
||||
|
Reference in New Issue
Block a user