Compare commits

...

1 Commits

19
otp.c
View File

@@ -158,6 +158,7 @@ int interactive_mode(void) {
handle_pads_menu();
break;
case 'X':
case 'Q':
printf("Goodbye!\n");
return 0;
default:
@@ -3045,10 +3046,15 @@ int handle_pads_menu(void) {
char input[10];
if (fgets(input, sizeof(input), stdin)) {
char choice = toupper(input[0]);
if (choice == 'G') {
return handle_generate_menu();
char choice = toupper(input[0]);
if (choice == 'G') {
int result = handle_generate_menu();
if (result == 0) {
// After successful pad generation, return to pads menu
return handle_pads_menu();
}
return result;
}
}
return 0;
}
@@ -3117,7 +3123,12 @@ int handle_pads_menu(void) {
// Handle actions first
if (toupper(input[0]) == 'G') {
return handle_generate_menu();
int result = handle_generate_menu();
if (result == 0) {
// After successful pad generation, return to pads menu
return handle_pads_menu();
}
return result;
} else if (toupper(input[0]) == 'B') {
return 0; // Back to main menu
}