Skip to content

Commit

Permalink
application/delete_save: Fix remaining fakematches
Browse files Browse the repository at this point in the history
  • Loading branch information
tgsm committed Nov 15, 2024
1 parent 9867831 commit d1396a7
Showing 1 changed file with 10 additions and 30 deletions.
40 changes: 10 additions & 30 deletions src/application/delete_savedata.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,26 +288,16 @@ static BOOL DeleteSavedataApp_DoMainTask(DeleteSavedataApp_Data *data) {
data->mainState = MAINSTATE_HANDLE_INPUT;
break;
case MAINSTATE_HANDLE_INPUT: {
int result = Handle2dMenuInput_DeleteOnFinish(data->yesNoMenu, data->heapId);

// FIXME: Fakematch
if (result == LIST_NO_MULTIPLE_SCROLL) {
goto no_multiple_scroll1;
} else if (result != LIST_CANCEL) {
break;
} else {
goto cancel1;
}

no_multiple_scroll1: {
u32 result = Handle2dMenuInput_DeleteOnFinish(data->yesNoMenu, data->heapId);
switch (result) {
case LIST_NO_MULTIPLE_SCROLL:
data->mainState = MAINSTATE_ASK_TO_CONFIRM;
break;
}

cancel1: {
case LIST_CANCEL:
data->mainState = MAINSTATE_EXIT;
break;
}
break;
}
case MAINSTATE_ASK_TO_CONFIRM:
if (DeleteSavedataApp_PrintMessage(data, msg_0007_00001, TRUE, 4) != TRUE) {
Expand All @@ -318,26 +308,16 @@ static BOOL DeleteSavedataApp_DoMainTask(DeleteSavedataApp_Data *data) {
data->mainState = MAINSTATE_HANDLE_CONFIRMATION;
break;
case MAINSTATE_HANDLE_CONFIRMATION: {
int result = Handle2dMenuInput_DeleteOnFinish(data->yesNoMenu, data->heapId);

// FIXME: Fakematch
if (result == LIST_NO_MULTIPLE_SCROLL) {
goto no_multiple_scroll2;
} else if (result != LIST_CANCEL) {
break;
} else {
goto cancel2;
}

no_multiple_scroll2: {
u32 result = Handle2dMenuInput_DeleteOnFinish(data->yesNoMenu, data->heapId);
switch (result) {
case LIST_NO_MULTIPLE_SCROLL:
data->mainState = MAINSTATE_PRINT_DELETING_MESSAGE;
break;
}

cancel2: {
case LIST_CANCEL:
data->mainState = MAINSTATE_EXIT;
break;
}
break;
}
case MAINSTATE_PRINT_DELETING_MESSAGE:
if (DeleteSavedataApp_PrintMessage(data, msg_0007_00002, TRUE, TEXT_SPEED_INSTANT) != TRUE) {
Expand Down

0 comments on commit d1396a7

Please sign in to comment.