From 3c62a967a299c56a62be670723ea6ff5d2e93039 Mon Sep 17 00:00:00 2001 From: fgsfds Date: Tue, 26 Dec 2023 22:58:08 +0100 Subject: [PATCH] port: display branch name in legal screen --- Makefile.port | 9 +++++++++ src/game/title.c | 2 ++ 2 files changed, 11 insertions(+) diff --git a/Makefile.port b/Makefile.port index db1d2bbd9..0a53f3d33 100644 --- a/Makefile.port +++ b/Makefile.port @@ -116,14 +116,23 @@ else endif VERSION_HASH := $(shell git rev-parse --short HEAD) +VERSION_BRANCH := $(shell git rev-parse --abbrev-ref HEAD) VERSION_TARGET := $(TARGET_PLATFORM) VERSION_ROMID := $(ROMID) +ifeq ($(VERSION_BRANCH),) + VERSION_BRANCH := port-custom +endif +ifeq ($(VERSION_BRANCH),HEAD) + VERSION_BRANCH := port-custom +endif + DEFINES := \ VERSION=$(VERSION) \ VERSION_HASH=\"$(VERSION_HASH)\" \ VERSION_TARGET=\"$(VERSION_TARGET)\" \ VERSION_ROMID=\"$(VERSION_ROMID)\" \ + VERSION_BRANCH=\"$(VERSION_BRANCH)\" \ MATCHING=0 \ PAL=$(IS_PAL) \ PIRACYCHECKS=0 \ diff --git a/src/game/title.c b/src/game/title.c index 23f48290f..db1a78531 100644 --- a/src/game/title.c +++ b/src/game/title.c @@ -372,6 +372,8 @@ Gfx *titleRenderLegal(Gfx *gdl) elem->textptr = VERSION_HASH " (" VERSION_TARGET ")"; } else if (elem->textid == L_OPTIONS_083) { elem->textptr = VERSION_ROMID; + } else if (elem->textid == L_OPTIONS_082) { + elem->textptr = "Perfect Dark (" VERSION_BRANCH ")"; } #endif break;