t/gui: Show git hash in Window title (NFC)

This commit is contained in:
Jakob Bornecrantz 2021-05-26 16:28:46 +01:00
parent b4dac8d6fc
commit b3e9653994
2 changed files with 5 additions and 1 deletions

View file

@ -0,0 +1 @@
gui: Show git description in `monado-gui` window title.

View file

@ -9,6 +9,7 @@
#include "ogl/ogl_api.h"
#include "gui_sdl2.h"
#include "util/u_git_tag.h"
/*
@ -60,7 +61,9 @@ gui_sdl2_init(struct sdl2_program *p)
}
p->sdl_initialized = true;
const char *title = "Monado! ☺";
char title[1024];
snprintf(title, sizeof(title), "Monado! ☺ (%s)", u_git_tag);
int x = SDL_WINDOWPOS_UNDEFINED;
int y = SDL_WINDOWPOS_UNDEFINED;
int w = 1920;