Skip to content

Commit

Permalink
Try fixing in-game menu open crash bug
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Jan 16, 2024
1 parent d29bdb4 commit 7319cf8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions retail/cardengine/arm7/source/inGameMenu.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ void inGameMenu(void) {

sharedAddr[0] = errorBak;
sharedAddr[4] = 0;
sharedAddr[5] = 0;
sharedAddr[7] -= 0x10000000; // Clear time receive flag
timeTillStatusRefresh = 7;

Expand Down
1 change: 1 addition & 0 deletions retail/cardenginei/arm7/source/inGameMenu.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ void inGameMenu(void) {

sharedAddr[0] = errorBak;
sharedAddr[4] = 0;
sharedAddr[5] = 0;
sharedAddr[7] -= 0x10000000; // Clear time receive flag
timeTillStatusRefresh = 7;

Expand Down
1 change: 1 addition & 0 deletions retail/cardenginei/arm7_dsiware/source/inGameMenu.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ void inGameMenu(void) {

sharedAddr[0] = errorBak;
sharedAddr[4] = 0;
sharedAddr[5] = 0;
sharedAddr[7] -= 0x10000000; // Clear time receive flag
timeTillStatusRefresh = 7;

Expand Down
4 changes: 4 additions & 0 deletions retail/cardenginei/arm9/source/cardengine.c
Original file line number Diff line number Diff line change
Expand Up @@ -1177,6 +1177,10 @@ extern void reset(u32 param, u32 tid2);
void inGameMenu(s32* exRegisters) {
int oldIME = enterCriticalSection();

while (sharedAddr[5] != 0x4C4D4749) { // 'IGML'
while (REG_VCOUNT != 191) swiDelay(100);
while (REG_VCOUNT == 191) swiDelay(100);
}
while (sharedAddr[5] == 0x4C4D4749) { // 'IGML'
while (REG_VCOUNT != 191) swiDelay(100);
while (REG_VCOUNT == 191) swiDelay(100);
Expand Down
4 changes: 4 additions & 0 deletions retail/cardenginei/arm9_dsiware/source/cardengine.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ void reset(u32 tid1, u32 tid2) {
void inGameMenu(s32* exRegisters) {
int oldIME = enterCriticalSection();

while (sharedAddr[5] != 0x4C4D4749) { // 'IGML'
while (REG_VCOUNT != 191) swiDelay(100);
while (REG_VCOUNT == 191) swiDelay(100);
}
while (sharedAddr[5] == 0x4C4D4749) { // 'IGML'
while (REG_VCOUNT != 191) swiDelay(100);
while (REG_VCOUNT == 191) swiDelay(100);
Expand Down

0 comments on commit 7319cf8

Please sign in to comment.