Don't install system titles without Unlaunch

This commit is contained in:
Pk11 2022-01-15 03:26:05 -06:00
parent 8f203aa5c5
commit c14a2c8548
3 changed files with 13 additions and 1 deletions

View File

@ -397,6 +397,17 @@ bool install(char* fpath, bool systemTitle)
goto error; goto error;
} }
//no system titles without Unlaunch
if (!unlaunchFound && h->tid_high != 0x00030004)
{
iprintf("\x1B[31m"); //red
iprintf("Error: ");
iprintf("\x1B[33m"); //yellow
iprintf("This title cannot be\ninstalled without Unlaunch.\n");
iprintf("\x1B[47m"); //white
goto error;
}
//blacklisted titles //blacklisted titles
{ {
//tid without region //tid without region

View File

@ -8,6 +8,7 @@
bool programEnd = false; bool programEnd = false;
bool sdnandMode = true; bool sdnandMode = true;
bool unlaunchFound = false;
bool arm7Exiting = false; bool arm7Exiting = false;
bool charging = false; bool charging = false;
u8 batteryLevel = 0; u8 batteryLevel = 0;
@ -143,7 +144,6 @@ int main(int argc, char **argv)
//check for unlaunch //check for unlaunch
{ {
bool unlaunchFound = false;
FILE *file = fopen("nand:/sys/HWINFO_S.dat", "rb"); FILE *file = fopen("nand:/sys/HWINFO_S.dat", "rb");
if (file) if (file)
{ {

View File

@ -7,6 +7,7 @@
extern bool programEnd; extern bool programEnd;
extern bool sdnandMode; extern bool sdnandMode;
extern bool unlaunchFound;
extern bool charging; extern bool charging;
extern u8 batteryLevel; extern u8 batteryLevel;