Added the build date to to main menu for alpha and dev builds.

This commit is contained in:
Leon Styhre 2022-04-19 17:27:04 +02:00
parent 277a729a2d
commit 954f1aa4f8
2 changed files with 12 additions and 0 deletions

View file

@ -309,6 +309,11 @@ if(APPLE AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.14)
add_compile_definitions(LEGACY_MACOS)
endif()
# If it's an alpha or dev build, then display the build date in the main menu.
if(ES_VERSION MATCHES alpha OR ES_VERSION MATCHES dev)
add_compile_definitions(MENU_BUILD_DATE)
endif()
# GLM library options.
add_compile_definitions(GLM_FORCE_CXX17)
add_compile_definitions(GLM_FORCE_XYZW_ONLY)

View file

@ -1384,7 +1384,14 @@ void GuiMenu::addVersionInfo()
{
mVersion.setFont(Font::get(FONT_SIZE_SMALL));
mVersion.setColor(0x5E5E5EFF);
#if defined(MENU_BUILD_DATE)
mVersion.setText("EMULATIONSTATION-DE V" + Utils::String::toUpper(PROGRAM_VERSION_STRING) +
" (Built " + __DATE__ + ")");
#else
mVersion.setText("EMULATIONSTATION-DE V" + Utils::String::toUpper(PROGRAM_VERSION_STRING));
#endif
mVersion.setHorizontalAlignment(ALIGN_CENTER);
addChild(&mVersion);
}