Allow overriding the default font via gm9/support/font.pbm

This commit is contained in:
d0k3 2018-02-27 00:00:57 +01:00
parent b63de24c26
commit 84bfac6a1b
3 changed files with 12 additions and 2 deletions

View File

@ -1946,6 +1946,16 @@ u32 GodMode(int entrypoint) {
InitNandCrypto(entrypoint != ENTRY_B9S); InitNandCrypto(entrypoint != ENTRY_B9S);
InitExtFS(); InitExtFS();
// custom font handling
if (CheckSupportFile("font.pbm")) {
u8* pbm = (u8*) malloc(0x10000); // arbitrary, should be enough by far
if (pbm) {
u32 pbm_size = LoadSupportFile("font.pbm", pbm, 0x10000);
if (pbm_size) SetFontFromPbm(pbm, pbm_size);
free(pbm);
}
}
// check for embedded essential backup // check for embedded essential backup
if (((entrypoint == ENTRY_NANDBOOT) || (entrypoint == ENTRY_B9S)) && if (((entrypoint == ENTRY_NANDBOOT) || (entrypoint == ENTRY_B9S)) &&
!PathExist("S:/essential.exefs") && CheckGenuineNandNcsd() && !PathExist("S:/essential.exefs") && CheckGenuineNandNcsd() &&

View File

@ -6,7 +6,7 @@
// known file names inside VRAM0 TAR // known file names inside VRAM0 TAR
#define VRAM0_AUTORUN_GM9 "autorun.gm9" #define VRAM0_AUTORUN_GM9 "autorun.gm9"
#define VRAM0_FONT_PBM "font.pbm" #define VRAM0_FONT_PBM "font_default.pbm"
#define VRAM0_SCRIPTS "scripts" #define VRAM0_SCRIPTS "scripts"
#define VRAM0_README_MD "README.md" #define VRAM0_README_MD "README.md"
#define VRAM0_SPLASH_PCX FLAVOR "_splash.pcx" #define VRAM0_SPLASH_PCX FLAVOR "_splash.pcx"