From df503178835575fe23b831f190f7cb84fb4f9b84 Mon Sep 17 00:00:00 2001 From: Robz8 Date: Mon, 11 Jun 2018 22:51:23 -0600 Subject: [PATCH] Show version number next to "Launcher" text --- Makefile | 8 ++++---- source/main.cpp | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 236318e..4ccfaa3 100644 --- a/Makefile +++ b/Makefile @@ -20,9 +20,9 @@ BANNERTOOL ?= ../bannertool.exe # Cersion number #--------------------------------------------------------------------------------- -VERSION_MAJOR := 4 -VERSION_MINOR := 2 -VERSION_MICRO := 1 +VERSION_MAJOR := 1 +VERSION_MINOR := 1 +VERSION_MICRO := 0 #--------------------------------------------------------------------------------- # TARGET is the name of the output # BUILD is the directory where object files & intermediate files will be placed @@ -59,7 +59,7 @@ RSF_FILE := app/build-cia.rsf #--------------------------------------------------------------------------------- ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -CFLAGS := -g -Wall -O2 -mword-relocations \ +CFLAGS := -g -Wall -O2 -DVERSION_MAJOR=$(VERSION_MAJOR) -DVERSION_MINOR=$(VERSION_MINOR) -DVERSION_MICRO=$(VERSION_MICRO) -mword-relocations \ -ffunction-sections \ $(ARCH) diff --git a/source/main.cpp b/source/main.cpp index 849922c..b64abe7 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -56,6 +56,9 @@ void screenon() gspLcdExit(); } +// Version numbers. +char launcher_vertext[13]; + int main() { aptInit(); @@ -65,6 +68,8 @@ int main() srvInit(); hidInit(); + snprintf(launcher_vertext, 13, "v%d.%d.%d", VERSION_MAJOR, VERSION_MINOR, VERSION_MICRO); + // make folders if they don't exist mkdir("sdmc:/3ds", 0777); // For DSP dump mkdir("sdmc:/_nds", 0777); @@ -183,6 +188,7 @@ int main() else pp2d_draw_on(GFX_TOP, (gfx3dSide_t)topfb); pp2d_draw_texture(topbgtex, 0, 0); pp2d_draw_texture(logotex, offset3D[topfb].logo+400/2 - 256/2, 240/2 - 128/2); + pp2d_draw_text(offset3D[topfb].logo+272, 138, 0.50, 0.50, BLACK, launcher_vertext); if (fadealpha > 0) pp2d_draw_rectangle(0, 0, 400, 240, RGBA8(0, 0, 0, fadealpha)); // Fade in/out effect } pp2d_draw_on(GFX_BOTTOM, GFX_LEFT);