From 69c3f46640328759f8753f6aa8ad6006389bd26d Mon Sep 17 00:00:00 2001 From: Luxferre Date: Wed, 21 Jan 2026 10:23:57 +0200 Subject: [PATCH] added exit guard for nes/gb --- gb/gbscoundrel.c | 6 ++++-- nes/nescoundrel.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gb/gbscoundrel.c b/gb/gbscoundrel.c index 81b22f7..16666de 100644 --- a/gb/gbscoundrel.c +++ b/gb/gbscoundrel.c @@ -368,8 +368,10 @@ s16 game() { } if(ch == CH_Q) { - hp = 0; - break; + if(confirm("End game?")) { + hp = 0; + break; + } else print_msg("Go on!"); } else if(ch == CH_INVAL) { print_msg("Invalid input!"); beep_err(); diff --git a/nes/nescoundrel.c b/nes/nescoundrel.c index e4f47ec..93c0a15 100644 --- a/nes/nescoundrel.c +++ b/nes/nescoundrel.c @@ -393,8 +393,10 @@ s16 game() { } if(ch == CH_Q) { - hp = 0; - break; + if(confirm("End game?")) { + hp = 0; + break; + } else print_msg("Go on!"); } else if(ch == CH_INVAL) { print_msg("Invalid input!"); beep_err();