From 7ed1c0aeac12fc7078013d0cb57ae40e6ee934d6 Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Fri, 30 Oct 2009 18:07:22 +0100 Subject: SDLvncviewer: add SIGINT handler to be able to actually stop program. Signed-off-by: Christian Beier Signed-off-by: Johannes Schindelin --- client_examples/SDLvncviewer.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'client_examples') 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 +#include #include #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); */ -- cgit v1.2.1