summaryrefslogtreecommitdiff
path: root/Source/Plugins
diff options
context:
space:
mode:
authorrog <rdragoon@optonline.net>2012-11-11 17:57:06 -0500
committerrog <rdragoon@optonline.net>2012-11-11 17:57:06 -0500
commita5d210129d433cee7df6c7d8d52152ade13ebcd0 (patch)
tree7d9fedc9fc151e8b848e882a28f6906a279c0391 /Source/Plugins
parent35e5a1e5921e48a40d6cf46510def68ee8eccfcf (diff)
Add an on screen lag counter.
Diffstat (limited to 'Source/Plugins')
-rw-r--r--Source/Plugins/Plugin_VideoDX11/Src/Render.cpp14
-rw-r--r--Source/Plugins/Plugin_VideoDX9/Src/Render.cpp15
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/Render.cpp4
3 files changed, 27 insertions, 6 deletions
diff --git a/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp b/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp
index 81efa3623f..079692b76b 100644
--- a/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp
+++ b/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp
@@ -45,6 +45,7 @@
#include "BPFunctions.h"
#include "AVIDump.h"
#include "FPSCounter.h"
+#include "ConfigManager.h"
namespace DX11
{
@@ -1094,11 +1095,18 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
D3D::font.DrawTextScaled(0, 0, 20, 0.0f, 0xFF00FFFF, fps);
}
+ if (SConfig::GetInstance().m_showLag)
+ {
+ char lag[10];
+ StringCchPrintfA(lag, 1000, "Lag: %d\n", Movie::g_currentLagCount);
+ D3D::font.DrawTextScaled(0, 18, 20, 0.0f, 0xFF00FFFF, lag);
+ }
+
if (g_ActiveConfig.bShowInputDisplay)
{
char inputDisplay[1000];
StringCchPrintfA(inputDisplay, 1000, Movie::GetInputDisplay().c_str());
- D3D::font.DrawTextScaled(0, 30, 20, 0.0f, 0xFF00FFFF, inputDisplay);
+ D3D::font.DrawTextScaled(0, 36, 20, 0.0f, 0xFF00FFFF, inputDisplay);
}
Renderer::DrawDebugText();
@@ -1106,13 +1114,13 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
{
char buf[32768];
Statistics::ToString(buf);
- D3D::font.DrawTextScaled(0, 30, 20, 0.0f, 0xFF00FFFF, buf);
+ D3D::font.DrawTextScaled(0, 36, 20, 0.0f, 0xFF00FFFF, buf);
}
else if (g_ActiveConfig.bOverlayProjStats)
{
char buf[32768];
Statistics::ToStringProj(buf);
- D3D::font.DrawTextScaled(0, 30, 20, 0.0f, 0xFF00FFFF, buf);
+ D3D::font.DrawTextScaled(0, 36, 20, 0.0f, 0xFF00FFFF, buf);
}
OSD::DrawMessages();
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp
index a59adb4793..c4e37e761e 100644
--- a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp
+++ b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp
@@ -55,6 +55,7 @@
#include "Movie.h"
#include "BPFunctions.h"
#include "FPSCounter.h"
+#include "ConfigManager.h"
namespace DX9
{
@@ -1091,23 +1092,31 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
D3D::font.DrawTextScaled(0, 0, 20, 20, 0.0f, 0xFF00FFFF, fps);
}
+ if (SConfig::GetInstance().m_showLag)
+ {
+ char lag[10];
+ StringCchPrintfA(lag, 1000, "Lag: %d\n", Movie::g_currentLagCount);
+ D3D::font.DrawTextScaled(0, 18, 20, 20, 0.0f, 0xFF00FFFF, lag);
+ }
+
if (g_ActiveConfig.bShowInputDisplay)
{
char inputDisplay[1000];
StringCchPrintfA(inputDisplay, 1000, Movie::GetInputDisplay().c_str());
- D3D::font.DrawTextScaled(0, 30, 20, 20, 0.0f, 0xFF00FFFF, inputDisplay);
+ D3D::font.DrawTextScaled(0, 36, 20, 20, 0.0f, 0xFF00FFFF, inputDisplay);
}
+
Renderer::DrawDebugText();
if (g_ActiveConfig.bOverlayStats)
{
Statistics::ToString(st);
- D3D::font.DrawTextScaled(0, 30, 20, 20, 0.0f, 0xFF00FFFF, st);
+ D3D::font.DrawTextScaled(0, 36, 20, 20, 0.0f, 0xFF00FFFF, st);
}
else if (g_ActiveConfig.bOverlayProjStats)
{
Statistics::ToStringProj(st);
- D3D::font.DrawTextScaled(0, 30, 20, 20, 0.0f, 0xFF00FFFF, st);
+ D3D::font.DrawTextScaled(0, 35, 20, 20, 0.0f, 0xFF00FFFF, st);
}
OSD::DrawMessages();
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
index a6121e1436..4f74454ece 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
@@ -62,6 +62,7 @@
#include "Host.h"
#include "BPFunctions.h"
#include "FPSCounter.h"
+#include "ConfigManager.h"
#include "main.h" // Local
#ifdef _WIN32
@@ -531,6 +532,9 @@ void Renderer::DrawDebugInfo()
if (g_ActiveConfig.bShowFPS)
p+=sprintf(p, "FPS: %d\n", s_fps);
+ if (SConfig::GetInstance().m_showLag)
+ p+=sprintf(p, "Lag: %d\n", Movie::g_currentLagCount);
+
if (g_ActiveConfig.bShowInputDisplay)
p+=sprintf(p, "%s", Movie::GetInputDisplay().c_str());