From 941f511a26ebdfbeb53facc775f30b9d27f3855b Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Sat, 30 Jul 2011 11:39:04 +0200 Subject: 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 Signed-off-by: Anthony Liguori --- ui/sdl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ui/sdl.c') 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() || -- cgit v1.2.3