Shorten cxbxr title string

This commit is contained in:
ergo720 2021-07-14 10:55:45 +02:00
parent 74c8b0cde1
commit cf8ff008a8
3 changed files with 6 additions and 10 deletions

View File

@ -7,8 +7,10 @@
/*! version string dependent on trace flag */
#ifndef _DEBUG_TRACE
const char* CxbxVersionStr = _GIT_VERSION " (" __DATE__ ")";
const char *CxbxrHashBuild = _GIT_VERSION;
#else
const char* CxbxVersionStr = _GIT_VERSION "-Trace (" __DATE__ ")";
const char *CxbxrHashBuild = _GIT_VERSION "-Trace";
#endif
static constexpr const char *GitVersionStr = _GIT_VERSION;

View File

@ -1,6 +1,7 @@
#pragma once
extern const char* CxbxVersionStr;
extern const char *CxbxrHashBuild;
// Note: GitVersionMaxLength should be large enough to accomodate the longest git version string we can practically expect to have. This is necessary
// to avoid possible mismatches in the string length which can happen if the user mixes different cxbxr versions

View File

@ -205,7 +205,7 @@ WndMain::WndMain(HINSTANCE x_hInstance) :
// initialize members
{
m_classname = "WndMain";
m_wndname = "Cxbx-Reloaded " + std::string(CxbxVersionStr);
m_wndname = "Cxbx-Reloaded " + std::string(CxbxrHashBuild);
}
// load configuration from settings file
@ -1868,16 +1868,9 @@ void WndMain::UpdateCaption()
{
char AsciiTitle[MAX_PATH];
int i = sprintf(AsciiTitle, "Cxbx-Reloaded %s", CxbxVersionStr);
int i = sprintf(AsciiTitle, "Cxbx-Reloaded %s", CxbxrHashBuild);
if (m_Xbe != nullptr) {
if (m_bIsStarted) {
i += sprintf(AsciiTitle + i, " : Emulating ");
}
else {
i += sprintf(AsciiTitle + i, " : Loaded ");
}
i += sprintf(AsciiTitle + i, "%s v1.%02d (%s)", FormatTitleId(m_Xbe->m_Certificate.dwTitleId).c_str(), m_Xbe->m_Certificate.dwVersion, m_Xbe->m_szAsciiTitle);
i += sprintf(AsciiTitle + i, " : %s v1.%02d (%s)", FormatTitleId(m_Xbe->m_Certificate.dwTitleId).c_str(), m_Xbe->m_Certificate.dwVersion, m_Xbe->m_szAsciiTitle);
UpdateFpsStatus();
UpdateLogStatus();