mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-21 19:45:10 +00:00
Add commit hash to window title for nightly builds.
This also adds a flag for detecting nightly builds in the code.
This commit is contained in:
parent
a23aa77b57
commit
1298cd6017
2 changed files with 15 additions and 1 deletions
9
Makefile
9
Makefile
|
@ -123,6 +123,15 @@ endif
|
|||
endif
|
||||
endif
|
||||
|
||||
# Stuff for showing the git hash in the intro on nightly builds
|
||||
# From https://stackoverflow.com/questions/44038428/include-git-commit-hash-and-or-branch-name-in-c-c-source
|
||||
ifeq ($(shell git rev-parse --abbrev-ref HEAD),nightly)
|
||||
$(info Hello Caldera!!! I'm here all week!)
|
||||
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)\""
|
||||
endif
|
||||
|
||||
# Microcode
|
||||
|
||||
ifeq ($(GRUCODE),f3dex) # Fast3DEX
|
||||
|
|
|
@ -156,13 +156,18 @@ static void gfx_sdl_init(void) {
|
|||
else if (gCLIOpts.FullScreen == 2)
|
||||
configWindow.fullscreen = false;
|
||||
|
||||
const char* window_title =
|
||||
const char window_title[96] =
|
||||
#ifndef USE_GLES
|
||||
"Super Mario 64 PC port (OpenGL)";
|
||||
#else
|
||||
"Super Mario 64 PC port (OpenGL_ES2)";
|
||||
#endif
|
||||
|
||||
#ifdef NIGHTLY
|
||||
strcat(window_title, " nightly ");
|
||||
strcat(window_title, GIT_HASH);
|
||||
#endif
|
||||
|
||||
wnd = SDL_CreateWindow(
|
||||
window_title,
|
||||
configWindow.x, configWindow.y, configWindow.w, configWindow.h,
|
||||
|
|
Loading…
Reference in a new issue