Remove version text, add toggleable debug info(with commit hash!)

This commit is contained in:
erorcun
2021-02-12 01:49:09 +03:00
parent e98164ec41
commit 2c784d979a
9 changed files with 538 additions and 420 deletions

View File

@@ -75,6 +75,9 @@
#include "custompipes.h"
#include "screendroplets.h"
#include "VarConsole.h"
#ifdef USE_OUR_VERSIONING
#include "GitSHA1.h"
#endif
GlobalScene Scene;
@@ -91,6 +94,9 @@ bool gbModelViewer;
#ifdef TIMEBARS
bool gbShowTimebars;
#endif
#ifdef TOGGLEABLE_VERSION_TEXT
bool gDrawVersionText;
#endif
volatile int32 frameCount;
@@ -1061,13 +1067,58 @@ DisplayGameDebugText()
#ifdef DRAW_GAME_VERSION_TEXT
wchar ver[200];
#ifdef TOGGLEABLE_VERSION_TEXT
if(gDrawVersionText)
#endif
{
#ifdef USE_OUR_VERSIONING
char verA[200];
sprintf(verA,
#if defined _WIN32
"Win "
#elif defined __linux__
"Linux "
#elif defined __APPLE__
"Mac OS X "
#elif defined __FreeBSD__
"FreeBSD "
#else
"Posix-compliant "
#endif
#if defined __LP64__ || defined _WIN64
"64-bit "
#else
"32-bit "
#endif
#if defined RW_D3D9
"D3D9 "
#elif defined RWLIBS
"D3D8 "
#elif defined RW_GL3
"OpenGL "
#endif
#if defined AUDIO_OAL
"OAL "
#elif defined AUDIO_MSS
"MSS "
#endif
#if defined _DEBUG || defined DEBUG
"DEBUG "
#endif
"%.8s",
g_GIT_SHA1);
AsciiToUnicode(verA, ver);
CFont::SetScale(SCREEN_SCALE_X(0.5f), SCREEN_SCALE_Y(0.7f));
#else
AsciiToUnicode(version_name, ver);
CFont::SetScale(SCREEN_SCALE_X(0.5f), SCREEN_SCALE_Y(0.5f));
#endif
CFont::SetPropOn();
CFont::SetBackgroundOff();
CFont::SetFontStyle(FONT_STANDARD);
CFont::SetScale(SCREEN_SCALE_X(0.5f), SCREEN_SCALE_Y(0.5f));
CFont::SetCentreOff();
CFont::SetRightJustifyOff();
CFont::SetWrapx(SCREEN_WIDTH);
@@ -1076,6 +1127,8 @@ DisplayGameDebugText()
CFont::SetColor(CRGBA(255, 108, 0, 255));
CFont::PrintString(SCREEN_SCALE_X(10.0f), SCREEN_SCALE_Y(10.0f), ver);
#endif
}
#endif // #ifdef DRAW_GAME_VERSION_TEXT
FrameSamples++;
#ifdef FIX_HIGH_FPS_BUGS_ON_FRONTEND