Merge remote-tracking branch 'origin/develop' into merge-develop-rando-sep14

This commit is contained in:
Archez
2024-09-14 23:42:02 -04:00
35 changed files with 840 additions and 837 deletions

View File

@@ -5,6 +5,10 @@ const u16 gBuildVersionMajor = @CMAKE_PROJECT_VERSION_MAJOR@;
const u16 gBuildVersionMinor = @CMAKE_PROJECT_VERSION_MINOR@;
const u16 gBuildVersionPatch = @CMAKE_PROJECT_VERSION_PATCH@;
const char gGitBranch[] = "@CMAKE_PROJECT_GIT_BRANCH@";
const char gGitCommitHash[] = "@CMAKE_PROJECT_GIT_COMMIT_HASH@";
const char gGitCommitTag[] = "@CMAKE_PROJECT_GIT_COMMIT_TAG@";
const char gBuildTeam[] = "@PROJECT_TEAM@";
const char gBuildDate[] = __DATE__ " " __TIME__;
const char gBuildMakeOption[] = "";

View File

@@ -13,6 +13,7 @@
#include <soh/Enhancements/bootcommands.h>
#include <GameVersions.h>
#include <soh/SaveManager.h>
#include <string.h>
#include "time.h"
@@ -30,8 +31,24 @@ void Title_PrintBuildInfo(Gfx** gfxp) {
GfxPrint_Open(&printer, g);
GfxPrint_SetColor(&printer, 131, 154, 255, 255);
GfxPrint_SetPos(&printer, 1, 25);
GfxPrint_Printf(&printer, "%s", gBuildVersion);
//if tag is empty (not a release build)
bool showGitInfo = gGitCommitTag[0] == 0;
if (showGitInfo) {
GfxPrint_SetPos(&printer, 1, 24);
GfxPrint_Printf(&printer, "Git Branch: %s", gGitBranch);
//truncate the commit to 7 characters
char gGitCommitHashTruncated[8];
strncpy(gGitCommitHashTruncated, gGitCommitHash, 7);
gGitCommitHashTruncated[7] = 0;
GfxPrint_SetPos(&printer, 1, 25);
GfxPrint_Printf(&printer, "Git Commit: %s", gGitCommitHashTruncated);
} else {
GfxPrint_SetPos(&printer, 1, 25);
GfxPrint_Printf(&printer, "%s", gBuildVersion);
}
GfxPrint_SetPos(&printer, 1, 26);
GfxPrint_Printf(&printer, "%s", gBuildDate);