Skip to content
This repository has been archived by the owner on Apr 5, 2021. It is now read-only.

Commit

Permalink
Show version number next to "Launcher" text
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Jun 12, 2018
1 parent 4a808ff commit df50317
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down
6 changes: 6 additions & 0 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ void screenon()
gspLcdExit();
}

// Version numbers.
char launcher_vertext[13];

int main()
{
aptInit();
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit df50317

Please sign in to comment.