From 103562891e9cd2b072ce5830123b3f6ff66693f3 Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Wed, 1 Nov 2023 09:29:52 -0400 Subject: [PATCH] Fix #109 --- CMakeLists.txt | 6 +++--- src/libretro/CMakeLists.txt | 3 ++- src/libretro/libretro.cpp | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b3d3714f..f8f2ed05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,9 +25,6 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}") find_package(Git REQUIRED) include(GitInfo) -message(STATUS "Git revision: ${GIT_REVISION}") -message(STATUS "Git state: ${GIT_STATE}") - option(TRACY_ENABLE "Build with Tracy support." OFF) include(cmake/utils.cmake) @@ -35,6 +32,9 @@ include(cmake/FetchDependencies.cmake) include(cmake/ConfigureFeatures.cmake) include(cmake/ConfigureDependencies.cmake) +set(MELONDSDS_VERSION "${MELONDSDS_INFO_display_version} (${GIT_STATE}, upstream ${MELONDS_REPOSITORY_TAG}, ${CMAKE_BUILD_TYPE})") +message(STATUS "${MELONDSDS_INFO_corename} Version: ${MELONDSDS_VERSION}") + # Disabled by default due to https://github.com/JesseTG/melonds-ds/issues/81 # Enable it if you're going to work on it. option(ENABLE_THREADED_RENDERER "Enable the threaded software renderer." OFF) diff --git a/src/libretro/CMakeLists.txt b/src/libretro/CMakeLists.txt index 06cf150a..d5a2c714 100644 --- a/src/libretro/CMakeLists.txt +++ b/src/libretro/CMakeLists.txt @@ -206,8 +206,9 @@ if (WIN32 AND MINGW) endif() target_compile_definitions(libretro PUBLIC - MELONDSDS_VERSION="${CMAKE_PROJECT_VERSION}" + MELONDSDS_VERSION="${MELONDSDS_VERSION}" MELONDSDS_NAME="${CMAKE_PROJECT_NAME}" + MELONDSDS_VERSION_STRING="${CMAKE_PROJECT_NAME} ${MELONDSDS_VERSION}" PNTR_ENABLE_DEFAULT_FONT PNTR_ENABLE_FILTER_SMOOTH PNTR_ENABLE_TTF diff --git a/src/libretro/libretro.cpp b/src/libretro/libretro.cpp index dc0ff6d9..70ced840 100644 --- a/src/libretro/libretro.cpp +++ b/src/libretro/libretro.cpp @@ -142,10 +142,11 @@ PUBLIC_SYMBOL void retro_init(void) { #ifdef HAVE_TRACY tracy::StartupProfiler(); #endif - TracySetProgramName(MELONDSDS_NAME); + TracySetProgramName(MELONDSDS_VERSION_STRING); ZoneScopedN("retro_init"); retro::env::init(); retro::debug("retro_init"); + retro::info("{} {}", MELONDSDS_NAME, MELONDSDS_VERSION); retro_assert(NDSCart::Cart == nullptr); retro_assert(GBACart::Cart == nullptr); retro_assert(retro::content::get_loaded_nds_info() == nullopt);