From 4f0adf23c1b918b29c122092f4f1f480adb94f6c Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Sun, 18 Apr 2021 22:22:33 -0700 Subject: [PATCH] ui: Update no_shutdown to shutdown_action in shutdown request --- ui/xemu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/xemu.c b/ui/xemu.c index bc018732ac..7fd2c0d5b9 100644 --- a/ui/xemu.c +++ b/ui/xemu.c @@ -41,6 +41,7 @@ #include "ui/input.h" #include "ui/xemu-display.h" #include "sysemu/runstate.h" +#include "sysemu/runstate-action.h" #include "sysemu/sysemu.h" #include "xemu-hud.h" #include "xemu-input.h" @@ -609,7 +610,7 @@ static void handle_windowevent(SDL_Event *ev) allow_close = false; } if (allow_close) { - no_shutdown = 0; + shutdown_action = SHUTDOWN_ACTION_POWEROFF; qemu_system_shutdown_request(SHUTDOWN_CAUSE_HOST_UI); } } else { @@ -661,7 +662,7 @@ void sdl2_poll_events(struct sdl2_console *scon) allow_close = false; } if (allow_close) { - no_shutdown = 0; + shutdown_action = SHUTDOWN_ACTION_POWEROFF; qemu_system_shutdown_request(SHUTDOWN_CAUSE_HOST_UI); } break;