From a118265cb81c2f56105ce0b0569acd27ef09959e Mon Sep 17 00:00:00 2001 From: just nine Date: Wed, 14 Apr 2021 22:38:32 +0100 Subject: [PATCH] ungrab when quitting emulation --- emulator.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/emulator.c b/emulator.c index 320c080..06aa179 100644 --- a/emulator.c +++ b/emulator.c @@ -350,7 +350,8 @@ key_loop: } if (c == 'q') { printf("Quitting and exiting emulator.\n"); - end_signal = 1; + end_signal = 1; + goto key_end; } if (c == 'd') { realtime_disassembly ^= 1; @@ -379,6 +380,10 @@ key_loop: key_end: printf("[KBD] Keyboard thread ending\n"); + if (cfg->keyboard_grab) { + printf(ungrab_message); + release_device(keyboard_fd); + } return (void*)NULL; } -- 2.39.2