Improve title bar

This commit is contained in:
Filipianosol 2020-08-14 02:31:37 +02:00
parent 3f30bf7036
commit 0ca30fbd7e
2 changed files with 9 additions and 5 deletions

View File

@ -136,12 +136,14 @@ TARGET := sm64.$(VERSION)
VERSION_CFLAGS := -D$(VERSION_DEF) -D_LANGUAGE_C
VERSION_ASFLAGS := --defsym $(VERSION_DEF)=1
# Stuff for showing the git hash in the intro on nightly builds
# Stuff for showing the git hash in the intro
# From https://stackoverflow.com/questions/44038428/include-git-commit-hash-and-or-branch-name-in-c-c-source
GIT_HASH=`git rev-parse --short HEAD`
COMPILE_TIME=`date -u +'%Y-%m-%d %H:%M:%S UTC'`
VERSION_CFLAGS += -DGIT_HASH="\"$(GIT_HASH)\"" -DCOMPILE_TIME="\"$(COMPILE_TIME)\""
ifeq ($(shell git rev-parse --abbrev-ref HEAD),nightly)
GIT_HASH=`git rev-parse --short HEAD`
COMPILE_TIME=`date -u +'%Y-%m-%d %H:%M:%S UTC'`
VERSION_CFLAGS += -DNIGHTLY -DGIT_HASH="\"$(GIT_HASH)\"" -DCOMPILE_TIME="\"$(COMPILE_TIME)\""
VERSION_CFLAGS += -DNIGHTLY
endif
# Microcode

View File

@ -213,9 +213,11 @@ void main_func(void) {
#endif
char window_title[96] =
"Super Mario 64 EX (" RAPI_NAME ")"
"Super Mario 64 Render96ex (" RAPI_NAME ")"
#ifdef NIGHTLY
" nightly " GIT_HASH
#else
" " GIT_HASH
#endif
;