From 1d7ecb7f1b1865e88c454e8c8c9e9d080a1dd1d5 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Sun, 30 Mar 2025 19:41:07 +0300 Subject: [PATCH] ^C before loading a ROM quits again --- SDL/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SDL/main.c b/SDL/main.c index bceffe9..5eb27ee 100644 --- a/SDL/main.c +++ b/SDL/main.c @@ -699,6 +699,9 @@ static void rumble(GB_gameboy_t *gb, double amp) static void debugger_interrupt(int ignore) { #ifndef _WIN32 + if (!GB_is_inited(&gb)) { + exit(0); + } if (GB_debugger_is_stopped(&gb)) { pending_command = GB_SDL_QUIT_COMMAND; console_line_ready(); // Force the debugger wait-loop to process the command