diff --git a/CMakeLists.txt b/CMakeLists.txt index bfbaa76d5..829563ed6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index c2c402393..e526957c3 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -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); }