diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp index 2045c34b..78b57467 100644 --- a/src/core/Frontend.cpp +++ b/src/core/Frontend.cpp @@ -35,6 +35,7 @@ #include "FileLoader.h" #include "frontendoption.h" #include "IniFile.h" +#include "../skel/dc/dc.h" // Game has colors inlined in code. // For easier modification we collect them here: @@ -1930,6 +1931,15 @@ CMenuManager::Draw() CSprite2d::DrawRect(CRect(MENU_X_LEFT_ALIGNED(181), MENU_Y(99), MENU_X_LEFT_ALIGNED(229), MENU_Y(122)), CRGBA(m_PrefsPlayerRed, m_PrefsPlayerGreen, m_PrefsPlayerBlue, FadeIn(255))); } + char strver[200]; + wchar ustr[200]; + snprintf(strver, sizeof(strver), "DCA3: %s", getExecutableTag()); + AsciiToUnicode(strver, ustr); + + CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X), MENU_Y(MENU_TEXT_SIZE_Y)); + CFont::SetColor(CRGBA(MENUOPTION_COLOR.r, MENUOPTION_COLOR.g, MENUOPTION_COLOR.b, FadeIn(255))); + CFont::PrintString(MENU_X_LEFT_ALIGNED(BUILDID_TEXT_LEFT_MARGIN), SCREEN_SCALE_FROM_BOTTOM(BUILDID_TEXT_BOTTOM_MARGIN), ustr); + } int diff --git a/src/core/Frontend.h b/src/core/Frontend.h index 18f0f246..dbb86a8d 100644 --- a/src/core/Frontend.h +++ b/src/core/Frontend.h @@ -40,6 +40,9 @@ #define HELPER_TEXT_LEFT_MARGIN 320.0f #define HELPER_TEXT_BOTTOM_MARGIN 120.0f +#define BUILDID_TEXT_LEFT_MARGIN 320.0f +#define BUILDID_TEXT_BOTTOM_MARGIN 20.0f + #define PLAYERSETUP_LIST_TOP 28.0f #define PLAYERSETUP_LIST_BOTTOM 125.0f #define PLAYERSETUP_LIST_LEFT 200.0f diff --git a/src/skel/dc/dc.cpp b/src/skel/dc/dc.cpp index c0a33f46..4f2e8ccb 100644 --- a/src/skel/dc/dc.cpp +++ b/src/skel/dc/dc.cpp @@ -65,6 +65,8 @@ long _dwOperatingSystemVersion; #include "../../dreamcast/git-version.h" #include "dc.h" +#include + // This is defined on project-level, via premake5 or cmake #ifdef GET_KEYBOARD_INPUT_FROM_X11 #include @@ -2081,7 +2083,7 @@ const char* getCIJobId() { return CI_JOB_ID; } -static std::string executableTag = getBuildId() + ":" + getSourceId() + ":" + getCIJobId(); +static std::string executableTag = getBuildId().substr(0, 10) + ":" + getSourceId() + ":" + getCIJobId(); const char* getExecutableTag() { return executableTag.c_str();