Skip to content

Commit aca3d11

Browse files
committed
Bug fix
1 parent 163eea1 commit aca3d11

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

title/arm9/source/main.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,8 +989,11 @@ int main(int argc, char **argv)
989989
stop();
990990
}
991991

992-
if (*(u32*)(0x02000004) == 0xA32AE2B3) { // Unlaunch check
992+
u32 softResetParamsBak = 0;
993+
if (*(u32*)(0x02000004) != 0) {
993994
*(u32*)(0x02000000) = 0; // Clear soft-reset params
995+
} else {
996+
softResetParamsBak = *(u32*)(0x02000000);
994997
}
995998
// Soft-reset parameters
996999
/*
@@ -1078,6 +1081,8 @@ int main(int argc, char **argv)
10781081
fclose(twlCfg);
10791082
}
10801083

1084+
*(u32*)(0x02000000) = softResetParamsBak;
1085+
10811086
if (access(settingsinipath, F_OK) != 0 && (access("fat:/", F_OK) == 0)) {
10821087
settingsinipath =
10831088
DSIMENUPP_INI_FC; // Fallback to .ini path on flashcard, if not found on

0 commit comments

Comments
 (0)