^C before loading a ROM quits again

This commit is contained in:
Lior Halphon 2025-03-30 19:41:07 +03:00
parent 8c30a7c90c
commit 1d7ecb7f1b
1 changed files with 3 additions and 0 deletions

View File

@ -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