diff options
author | Christian Beier <dontmind@freeshell.org> | 2009-10-30 18:07:22 +0100 |
---|---|---|
committer | Johannes Schindelin <johannes.schindelin@gmx.de> | 2009-10-30 18:29:11 +0100 |
commit | 7ed1c0aeac12fc7078013d0cb57ae40e6ee934d6 (patch) | |
tree | c8e00b9b0488d40b4a764ad81fe86e7e6793bc56 /client_examples | |
parent | 1f6c5609851f3431f14c275a5e1d3c4900a63baa (diff) | |
download | libtdevnc-7ed1c0aeac12fc7078013d0cb57ae40e6ee934d6.tar.gz libtdevnc-7ed1c0aeac12fc7078013d0cb57ae40e6ee934d6.zip |
SDLvncviewer: add SIGINT handler to be able to actually stop program.
Signed-off-by: Christian Beier <dontmind@freeshell.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 'client_examples')
-rw-r--r-- | client_examples/SDLvncviewer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/client_examples/SDLvncviewer.c b/client_examples/SDLvncviewer.c index c8c63d1..5555cd1 100644 --- a/client_examples/SDLvncviewer.c +++ b/client_examples/SDLvncviewer.c @@ -1,4 +1,5 @@ #include <SDL.h> +#include <signal.h> #include <rfb/rfbclient.h> #include "scrap.h" @@ -498,6 +499,7 @@ int main(int argc,char** argv) { SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); atexit(SDL_Quit); + signal(SIGINT, exit); do { /* 16-bit: cl=rfbGetClient(5,3,2); */ |