summaryrefslogtreecommitdiff
path: root/ui/sdl.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-07-30 11:39:04 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-05 10:57:34 -0500
commit941f511a26ebdfbeb53facc775f30b9d27f3855b (patch)
tree0ab8cf96e57c5df6a37256a7bdb1eb6a8ee84142 /ui/sdl.c
parent257a7375582e4c3b32687c72d0f52279d28b2d85 (diff)
downloadqemu-941f511a26ebdfbeb53facc775f30b9d27f3855b.tar.gz
sdl: Fix termination in -no-shutdown mode
Just like the monitor does, we need to clear no_shutdown before calling qemu_system_shutdown_request on quit requests. Otherwise, QEMU just stops the VM. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ui/sdl.c')
-rw-r--r--ui/sdl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/sdl.c b/ui/sdl.c
index 6dbc5cb0ed..9efcda5079 100644
--- a/ui/sdl.c
+++ b/ui/sdl.c
@@ -672,8 +672,10 @@ static void sdl_refresh(DisplayState *ds)
sdl_process_key(&ev->key);
break;
case SDL_QUIT:
- if (!no_quit)
+ if (!no_quit) {
+ no_shutdown = 0;
qemu_system_shutdown_request();
+ }
break;
case SDL_MOUSEMOTION:
if (gui_grab || kbd_mouse_is_absolute() ||