From 306041880638ffdf66b8fd3fa8b8413e5db83959 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 23 Nov 2005 20:42:48 +0000 Subject: [PATCH] add the renderer name to stats (so that I won't be confused about which is being used) --- stepmania/src/RageDisplay.cpp | 9 +++++++-- stepmania/src/RageDisplay.h | 2 +- stepmania/src/RageDisplay_D3D.h | 2 +- stepmania/src/RageDisplay_Null.h | 2 +- stepmania/src/RageDisplay_OGL.h | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/stepmania/src/RageDisplay.cpp b/stepmania/src/RageDisplay.cpp index e0ebc7cdc6..a07ed2863b 100644 --- a/stepmania/src/RageDisplay.cpp +++ b/stepmania/src/RageDisplay.cpp @@ -105,11 +105,16 @@ void RageDisplay::ResetStats() CString RageDisplay::GetStats() const { + CString s; /* If FPS == 0, we don't have stats yet. */ if( !GetFPS() ) - return "-- FPS\n-- av FPS\n-- VPF"; + s = "-- FPS\n-- av FPS\n-- VPF"; - return ssprintf( "%i FPS\n%i av FPS\n%i VPF", GetFPS(), GetCumFPS(), GetVPF() ); + s = ssprintf( "%i FPS\n%i av FPS\n%i VPF", GetFPS(), GetCumFPS(), GetVPF() ); + + s += "\n"+this->GetApiDescription(); + + return s; } void RageDisplay::EndFrame() diff --git a/stepmania/src/RageDisplay.h b/stepmania/src/RageDisplay.h index c0b5c2d4c1..f174a37ded 100644 --- a/stepmania/src/RageDisplay.h +++ b/stepmania/src/RageDisplay.h @@ -133,7 +133,7 @@ public: /* This is needed or the overridden classes' dtors will not be called. */ virtual ~RageDisplay() { } - virtual CString GetApiDescription() = 0; + virtual CString GetApiDescription() const = 0; // Don't override this. Override TryVideoMode() instead. // This will set the video mode to be as close as possible to params. diff --git a/stepmania/src/RageDisplay_D3D.h b/stepmania/src/RageDisplay_D3D.h index ac67e220c7..52f2541a07 100644 --- a/stepmania/src/RageDisplay_D3D.h +++ b/stepmania/src/RageDisplay_D3D.h @@ -10,7 +10,7 @@ public: ~RageDisplay_D3D(); CString Init( VideoModeParams p ); - virtual CString GetApiDescription() { return "D3D"; } + virtual CString GetApiDescription() const { return "D3D"; } void ResolutionChanged(); const PixelFormatDesc *GetPixelFormatDesc(PixelFormat pf) const; diff --git a/stepmania/src/RageDisplay_Null.h b/stepmania/src/RageDisplay_Null.h index 57bd239ef9..9953e7eb52 100644 --- a/stepmania/src/RageDisplay_Null.h +++ b/stepmania/src/RageDisplay_Null.h @@ -8,7 +8,7 @@ class RageDisplay_Null: public RageDisplay public: RageDisplay_Null( VideoModeParams p ); - virtual CString GetApiDescription() { return "Null"; } + virtual CString GetApiDescription() const { return "Null"; } void ResolutionChanged() { } const PixelFormatDesc *GetPixelFormatDesc(PixelFormat pf) const; diff --git a/stepmania/src/RageDisplay_OGL.h b/stepmania/src/RageDisplay_OGL.h index c0a45bde3f..a52260de74 100644 --- a/stepmania/src/RageDisplay_OGL.h +++ b/stepmania/src/RageDisplay_OGL.h @@ -10,7 +10,7 @@ public: virtual ~RageDisplay_OGL(); CString Init( VideoModeParams p, bool bAllowUnacceleratedRenderer ); - virtual CString GetApiDescription() { return "OpenGL"; } + virtual CString GetApiDescription() const { return "OpenGL"; } void ResolutionChanged(); const PixelFormatDesc *GetPixelFormatDesc(PixelFormat pf) const;