added exit guard for nes/gb
This commit is contained in:
+4
-2
@@ -368,8 +368,10 @@ s16 game() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(ch == CH_Q) {
|
if(ch == CH_Q) {
|
||||||
hp = 0;
|
if(confirm("End game?")) {
|
||||||
break;
|
hp = 0;
|
||||||
|
break;
|
||||||
|
} else print_msg("Go on!");
|
||||||
} else if(ch == CH_INVAL) {
|
} else if(ch == CH_INVAL) {
|
||||||
print_msg("Invalid input!");
|
print_msg("Invalid input!");
|
||||||
beep_err();
|
beep_err();
|
||||||
|
|||||||
+4
-2
@@ -393,8 +393,10 @@ s16 game() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(ch == CH_Q) {
|
if(ch == CH_Q) {
|
||||||
hp = 0;
|
if(confirm("End game?")) {
|
||||||
break;
|
hp = 0;
|
||||||
|
break;
|
||||||
|
} else print_msg("Go on!");
|
||||||
} else if(ch == CH_INVAL) {
|
} else if(ch == CH_INVAL) {
|
||||||
print_msg("Invalid input!");
|
print_msg("Invalid input!");
|
||||||
beep_err();
|
beep_err();
|
||||||
|
|||||||
Reference in New Issue
Block a user