From 91fa4fa41238f6c6ca3aaf18504fdd773ccc3543 Mon Sep 17 00:00:00 2001 From: Helloman892 <1565516+Helloman892@users.noreply.github.com> Date: Tue, 5 Sep 2017 10:55:21 +0100 Subject: [PATCH] Resolves #22 (#52) 3 commits squashed and merged --- Makefile | 4 +++- source/draw.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d7c0c3e..1c495dc 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,9 @@ CFLAGS := -g -Wall -Wextra -mword-relocations \ -ffunction-sections \ $(ARCH) -CFLAGS += $(INCLUDE) -DARM11 -D_3DS -D_GNU_SOURCE +revision := $(shell git describe --tags --match v[0-9]* --abbrev=8 | sed 's/-[0-9]*-g/-/') + +CFLAGS += $(INCLUDE) -DARM11 -D_3DS -D_GNU_SOURCE -DVERSION="\"$(revision)\"" CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11 diff --git a/source/draw.c b/source/draw.c index 22c7d99..f4cd3f7 100644 --- a/source/draw.c +++ b/source/draw.c @@ -139,6 +139,7 @@ void draw_base_interface(void) pp2d_draw_on(GFX_BOTTOM); pp2d_draw_rectangle(0, 0, 320, 24, COLOR_ACCENT); pp2d_draw_rectangle(0, 216, 320, 24, COLOR_ACCENT); + pp2d_draw_text(7, 219, 0.6, 0.6, COLOR_WHITE, VERSION); pp2d_draw_on(GFX_TOP); }