Adjust formatting of git branch in game

- Detect and highlight detached HEAD on title screen and in console
- Remove '-' between branch and commit in console
This commit is contained in:
James R 2022-12-27 00:39:37 -08:00
parent cff0def2a4
commit cc30118e3b
2 changed files with 7 additions and 1 deletions

View file

@ -1211,6 +1211,12 @@ void D_SRB2Main(void)
/* break the version string into version numbers, for netplay */
D_ConvertVersionNumbers();
if (!strcmp(compbranch, ""))
{
// \x8b = aqua highlight
compbranch = "\x8b" "detached HEAD" "\x80";
}
#ifdef DEVELOP
D_AbbrevCommit();
#endif

View file

@ -4742,7 +4742,7 @@ static void Command_ListDoomednums_f(void)
static void Command_Version_f(void)
{
#ifdef DEVELOP
CONS_Printf("Ring Racers %s-%s (%s %s)\n", compbranch, comprevision, compdate, comptime);
CONS_Printf("Ring Racers %s %s (%s %s)\n", compbranch, comprevision, compdate, comptime);
#else
CONS_Printf("Ring Racers %s (%s %s %s %s) ", VERSIONSTRING, compdate, comptime, comprevision, compbranch);
#endif