Commit 0ae04d73678af8b975394e4a40e8326ddb7e5b9d

Authored by bellard
1 parent ebc05488

allow Ctrl-C to be pressed when using gdb stub and SDL


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@394 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 6 additions and 2 deletions
... ... @@ -42,8 +42,8 @@
42 42  
43 43 #include <SDL.h>
44 44  
45   -#include "cpu-i386.h"
46   -#include "exec.h"
  45 +#include "cpu.h"
  46 +#include "exec-all.h"
47 47  
48 48 #include "vl.h"
49 49  
... ... @@ -264,6 +264,10 @@ void sdl_display_init(DisplayState *ds)
264 264 fprintf(stderr, "Could not initialize SDL - exiting\n");
265 265 exit(1);
266 266 }
  267 + /* NOTE: we still want Ctrl-C to work, so we undo the SDL redirections */
  268 + signal(SIGINT, SIG_DFL);
  269 + signal(SIGQUIT, SIG_DFL);
  270 +
267 271 ds->dpy_update = sdl_update;
268 272 ds->dpy_resize = sdl_resize;
269 273 ds->dpy_refresh = sdl_refresh;
... ...