diff options
author | the lemons <citrons@mondecitronne.com> | 2023-02-07 19:17:27 -0600 |
---|---|---|
committer | the lemons <citrons@mondecitronne.com> | 2023-02-07 19:17:27 -0600 |
commit | 720f98b8ab509ae410840838b25a0e0337e50c92 (patch) | |
tree | f79725b2ff6f89f530499e26f9dc40c0c9ac3035 | |
parent | 52fdf6319f79b41dbc8531556c0334d538d2dae3 (diff) |
stop the process with space
-rw-r--r-- | core.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -4,6 +4,7 @@ #include <stdbool.h> #include <unistd.h> #include <assert.h> +#include <signal.h> #include <SDL.h> #include "procfs.h" @@ -168,6 +169,11 @@ static void handle_events() { prev_map(); refresh = true; break; + case SDLK_SPACE:; + static bool stopped = false; + kill(pid, stopped ? SIGSTOP : SIGCONT); + stopped = !stopped; + break; default: break; } |