Skip to content

Commit

Permalink
Add .ini-only setting to erase or not erase Unlaunch from Launcher .t…
Browse files Browse the repository at this point in the history
…md file
  • Loading branch information
RocketRobz committed Jan 24, 2024
1 parent 5bfb5af commit 1a7ed2e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arm9/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ static char tmdBuffer[TMD_SIZE];
bool splash = true;
bool dsiSplash = false;
bool titleAutoboot = false;
bool eraseUnlaunch = true;

bool splashFound[2] = {false};
bool splashBmp[2] = {false};
Expand Down Expand Up @@ -132,6 +133,7 @@ void loadSettings(void) {
splash = settingsini.GetInt("HIYA-CFW", "SPLASH", 0);
dsiSplash = settingsini.GetInt("HIYA-CFW", "DSI_SPLASH", 0);
titleAutoboot = settingsini.GetInt("HIYA-CFW", "TITLE_AUTOBOOT", 0);
eraseUnlaunch = settingsini.GetInt("HIYA-CFW", "ERASE_UNLAUNCH", 1);
}

void saveSettings(void) {
Expand Down Expand Up @@ -468,7 +470,7 @@ int main( int argc, char **argv) {

FILE* f_tmd = fopen(tmdpath, "rb");
if (f_tmd) {
if (getFileSize(tmdpath) > TMD_SIZE) {
if ((getFileSize(tmdpath) > TMD_SIZE) && eraseUnlaunch) {
// Read big .tmd file at the correct size
f_tmd = fopen(tmdpath, "rb");
fread(tmdBuffer, 1, TMD_SIZE, f_tmd);
Expand Down

0 comments on commit 1a7ed2e

Please sign in to comment.