Skip to content

Commit

Permalink
Add SHOW_FREE=1 and MONITOR_HEAP=1 build parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
d0k3 committed Apr 15, 2018
1 parent ed6e7a2 commit 4c97a09
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
20 changes: 11 additions & 9 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,17 @@ SPLASH = resources/$(FLAVOR)_splash.png

ifeq ($(FLAVOR),SafeMode9)
CFLAGS += -DSAFEMODE
endif

ifeq ($(FLAVOR),GodMode64)
else ifeq ($(FLAVOR),GodMode64)
OVERRIDE_FONT := resources/fonts/font_c64_8x8.pbm
CFLAGS += -DDEFAULT_FONT=\"font_c64_8x8.pbm\"
CFLAGS += -DCOLOR_STD_FONT=0xD5717B
CFLAGS += -DCOLOR_STD_BG=0xA43041
endif

ifeq ($(FLAVOR),BrickedMode9)
else ifeq ($(FLAVOR),BrickedMode9)
OVERRIDE_FONT := resources/fonts/font_nbraille_4x6.pbm
CFLAGS += -DDEFAULT_FONT=\"font_nbraille_4x6.pbm\"
CFLAGS += -DCOLOR_STD_FONT=0x00FFFF
CFLAGS += -DCOLOR_STD_BG=0xFF0000
endif

ifeq ($(FLAVOR),ZuishMode9)
else ifeq ($(FLAVOR),ZuishMode9)
OVERRIDE_FONT := resources/fonts/font_zuish_8x8.pbm
CFLAGS += -DDEFAULT_FONT=\"font_zuish_8x8.pbm\"
endif
Expand Down Expand Up @@ -57,6 +51,10 @@ ifeq ($(HIDE_HIDDEN),1)
CFLAGS += -DHIDE_HIDDEN
endif

ifeq ($(SHOW_FREE),1)
CFLAGS += -DSHOW_FREE
endif

ifdef FIXED_BRIGHTNESS
CFLAGS += -DFIXED_BRIGHTNESS=$(FIXED_BRIGHTNESS)
endif
Expand All @@ -65,6 +63,10 @@ ifdef SD_TIMEOUT
CFLAGS += -DSD_TIMEOUT=$(SD_TIMEOUT)
endif

ifeq ($(MONITOR_HEAP),1)
CFLAGS += -DMONITOR_HEAP
endif

ifdef NTRBOOT
FTFLAGS = -S spi-retail
FTDFLAGS = -S spi-dev
Expand Down
6 changes: 2 additions & 4 deletions arm9/source/godmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,7 @@ void DrawTopBar(const char* curr_path) {
DrawStringF(TOP_SCREEN, bartxt_rx, bartxt_start, COLOR_STD_BG, COLOR_TOP_BAR, "%19.19s", tempstr);
show_time = false;
}
#endif

#ifdef MONITOR_HEAP
#elif defined MONITOR_HEAP
if (true) { // allocated mem
const u32 bartxt_rx = SCREEN_WIDTH_TOP - (9*FONT_WIDTH_EXT) - bartxt_x;
char bytestr[32];
Expand Down Expand Up @@ -1819,7 +1817,7 @@ u32 HomeMoreMenu(char* current_path) {
ShowString("Building " TIKDB_NAME_ENC "...");
tik_enc_sys = (BuildTitleKeyInfo("1:/dbs/ticket.db", false, false) == 0);
tik_enc_emu = (BuildTitleKeyInfo("4:/dbs/ticket.db", false, false) == 0);
if (BuildTitleKeyInfo(NULL, false, true) != 0)
if (!tik_enc_sys || BuildTitleKeyInfo(NULL, false, true) != 0)
tik_enc_sys = tik_enc_emu = false;
}
bool tik_dec_sys = false;
Expand Down

0 comments on commit 4c97a09

Please sign in to comment.