Skip to content

Commit 7dd5680

Browse files
committed
Fix Quit Game opening the system menu instead of Unlaunch/TWLMenu++/boot.nds
1 parent 6687087 commit 7dd5680

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

retail/cardenginei/arm7/source/cardengine.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ static void unlaunchSetFilename(bool boot) {
232232
#ifdef TWLSDK
233233
*(u8*)(0x02000838+i2) = *(u8*)(ce7+0x8400+i); // Unlaunch Device:/Path/Filename.ext (16bit Unicode,end by 0000h)
234234
#else
235-
*(u8*)(0x02000838+i2) = *(u8*)(ce7+0xB400+i); // Unlaunch Device:/Path/Filename.ext (16bit Unicode,end by 0000h)
235+
*(u8*)(0x02000838+i2) = *(u8*)(ce7+0xF400+i); // Unlaunch Device:/Path/Filename.ext (16bit Unicode,end by 0000h)
236236
#endif
237237
i2 += 2;
238238
}
@@ -268,9 +268,9 @@ static void readSrBackendId(void) {
268268
*(u32*)(0x02000314) = *(u32*)(ce7+0x8504);
269269
*(u32*)(0x02000318) = /* *(u32*)(ce7+0x8504) == 0x00030000 ? 0x13 : */ 0x17;
270270
#else
271-
*(u32*)(0x02000310) = *(u32*)(ce7+0xB500);
272-
*(u32*)(0x02000314) = *(u32*)(ce7+0xB504);
273-
*(u32*)(0x02000318) = /* *(u32*)(ce7+0xB504) == 0x00030000 ? 0x13 : */ 0x17;
271+
*(u32*)(0x02000310) = *(u32*)(ce7+0xF500);
272+
*(u32*)(0x02000314) = *(u32*)(ce7+0xF504);
273+
*(u32*)(0x02000318) = /* *(u32*)(ce7+0xF504) == 0x00030000 ? 0x13 : */ 0x17;
274274
#endif
275275
*(u32*)(0x0200031C) = 0;
276276
*(u16*)(0x02000306) = swiCRC16(0xFFFF, (void*)0x02000308, 0x18);
@@ -487,11 +487,11 @@ void reset(const bool downloadedSrl) {
487487
if (consoleModel < 2) {
488488
if (valueBits & hiyaCfwFound) {
489489
unlaunchSetHiyaFilename();
490-
} else if (*(u32*)(ce7+0xB500) == 0 && (valueBits & b_dsiSD)) {
490+
} else if (*(u32*)(ce7+0xF500) == 0 && (valueBits & b_dsiSD)) {
491491
unlaunchSetFilename(false);
492492
}
493493
}
494-
if (*(u32*)(ce7+0xB500) == 0 && (valueBits & b_dsiSD)) {
494+
if (*(u32*)(ce7+0xF500) == 0 && (valueBits & b_dsiSD)) {
495495
tonccpy((u32*)0x02000300, sr_data_srloader, 0x20);
496496
} else {
497497
// Use different SR backend ID
@@ -796,7 +796,7 @@ void forceGameReboot(void) {
796796
#ifdef TWLSDK
797797
(*(u32*)(ce7+0x8500) == 0)
798798
#else
799-
(*(u32*)(ce7+0xB500) == 0)
799+
(*(u32*)(ce7+0xF500) == 0)
800800
#endif
801801
) {
802802
unlaunchSetFilename(false);
@@ -814,7 +814,7 @@ void forceGameReboot(void) {
814814
//if (doBak) restoreSdBakData();
815815
if (*(u32*)(ce7+0x8500) == 0 && (valueBits & b_dsiSD))
816816
#else
817-
if (*(u32*)(ce7+0xB500) == 0 && (valueBits & b_dsiSD))
817+
if (*(u32*)(ce7+0xF500) == 0 && (valueBits & b_dsiSD))
818818
#endif
819819
{
820820
tonccpy((u32*)0x02000300, sr_data_srloader, 0x20);
@@ -965,11 +965,11 @@ void returnToLoader(bool reboot) {
965965
#else
966966
IPC_SendSync(0x8);
967967
if (consoleModel >= 2) {
968-
if (*(u32*)(ce7+0xB500) == 0 && (valueBits & b_dsiSD))
968+
if (*(u32*)(ce7+0xF500) == 0 && (valueBits & b_dsiSD))
969969
{
970970
tonccpy((u32*)0x02000300, sr_data_srloader, 0x020);
971971
}
972-
else if (*(char*)(ce7+0xB503) == 'H' || *(char*)(ce7+0xB503) == 'K')
972+
else if (*(char*)(ce7+0xF503) == 'H' || *(char*)(ce7+0xF503) == 'K')
973973
{
974974
// Use different SR backend ID
975975
readSrBackendId();
@@ -978,7 +978,7 @@ void returnToLoader(bool reboot) {
978978
} else {
979979
if (valueBits & hiyaCfwFound) {
980980
unlaunchSetHiyaFilename();
981-
} else if (*(u32*)(ce7+0xB500) == 0 && (valueBits & b_dsiSD)) {
981+
} else if (*(u32*)(ce7+0xF500) == 0 && (valueBits & b_dsiSD)) {
982982
unlaunchSetFilename(true);
983983
} else {
984984
// Use different SR backend ID

0 commit comments

Comments
 (0)