From 4faf67e1944da5dff5abaca9b71fb350e3282026 Mon Sep 17 00:00:00 2001 From: d0k3 Date: Wed, 16 Aug 2017 15:50:46 +0200 Subject: [PATCH] Pull version numbers from git --- Makefile | 3 +++ source/common/common.h | 3 --- source/godmode.c | 7 ++++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 026c1d1..2327d5b 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,9 @@ CFLAGS := $(ARCH) -g -Wall -Wextra -Wpedantic -Wcast-align -Wno-main -O2 \ CFLAGS += -DBUILD_NAME="\"$(TARGET) (`date +'%Y/%m/%d'`)\"" +VERSION := $(shell git describe --tags --abbrev=8) +CFLAGS += -DVERSION="\"$(VERSION)\"" + ifeq ($(FONT),ORIG) CFLAGS += -DFONT_ORIGINAL else ifeq ($(FONT),6X10) diff --git a/source/common/common.h b/source/common/common.h index 3e87731..d7b892c 100644 --- a/source/common/common.h +++ b/source/common/common.h @@ -39,9 +39,6 @@ #define QLZ_SPLASH sm9_splash_baby_qlz #endif -// GodMode9 version -#define VERSION "1.3.3" - // input / output paths #define SUPPORT_PATHS "0:/gm9/support", "0:", "0:/files9" // legacy paths #define SCRIPT_PATH "0:/gm9/scripts" diff --git a/source/godmode.c b/source/godmode.c index b1d12e3..a12de6b 100644 --- a/source/godmode.c +++ b/source/godmode.c @@ -170,7 +170,7 @@ void DrawUserInterface(const char* curr_path, DirEntry* curr_entry, DirStruct* c if (*curr_path) { char bytestr0[32]; char bytestr1[32]; - // DrawStringF(TOP_SCREEN, bartxt_rx, bartxt_start, COLOR_STD_BG, COLOR_TOP_BAR, "%19.19s", "LOADING..."); + DrawStringF(TOP_SCREEN, bartxt_rx, bartxt_start, COLOR_STD_BG, COLOR_TOP_BAR, "%19.19s", "LOADING..."); FormatBytes(bytestr0, GetFreeSpace(curr_path)); FormatBytes(bytestr1, GetTotalSpace(curr_path)); snprintf(tempstr, 64, "%s/%s", bytestr0, bytestr1); @@ -243,7 +243,7 @@ void DrawUserInterface(const char* curr_path, DirEntry* curr_entry, DirStruct* c // bottom: inctruction block char instr[512]; snprintf(instr, 512, "%s\n%s%s%s%s%s%s%s%s", - FLAVOR " Explorer v"VERSION, // generic start part + FLAVOR " " VERSION, // generic start part (*curr_path) ? ((clipboard->n_entries == 0) ? "L - MARK files (use with \x18\x19\x1A\x1B)\nX - DELETE / [+R] RENAME file(s)\nY - COPY files / [+R] CREATE entry\n" : "L - MARK files (use with \x18\x19\x1A\x1B)\nX - DELETE / [+R] RENAME file(s)\nY - PASTE files / [+R] CREATE entry\n") : ((GetWritePermissions() > PERM_BASE) ? "R+Y - Relock write permissions\n" : ""), @@ -1588,7 +1588,7 @@ u32 HomeMoreMenu(char* current_path, DirStruct* current_dir, DirStruct* clipboar } u32 SplashInit() { - const char* namestr = FLAVOR " Explorer v" VERSION; + const char* namestr = FLAVOR " " VERSION; const char* loadstr = "loading..."; const u32 pos_xb = 10; const u32 pos_yb = 10; @@ -1655,6 +1655,7 @@ u32 GodMode() { } } + while (CheckButton(BUTTON_A)); // don't continue while A is held while (timer_msec( timer ) < 500); // show splash for at least 0.5 sec ClearScreenF(true, true, COLOR_STD_BG); // clear splash