Skip to content

Commit

Permalink
ungrab when quitting emulation
Browse files Browse the repository at this point in the history
  • Loading branch information
borb committed Apr 14, 2021
1 parent d3e59a0 commit a118265
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion emulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,8 @@ void *keyboard_task() {
}
if (c == 'q') {
printf("Quitting and exiting emulator.\n");
end_signal = 1;
end_signal = 1;
goto key_end;
}
if (c == 'd') {
realtime_disassembly ^= 1;
Expand Down Expand Up @@ -379,6 +380,10 @@ void *keyboard_task() {

key_end:
printf("[KBD] Keyboard thread ending\n");
if (cfg->keyboard_grab) {
printf(ungrab_message);
release_device(keyboard_fd);
}
return (void*)NULL;
}

Expand Down

0 comments on commit a118265

Please sign in to comment.