ui: Update no_shutdown to shutdown_action in shutdown request

This commit is contained in:
Matt Borgerson 2021-04-18 22:22:33 -07:00
parent 0caeda66b1
commit 4f0adf23c1
1 changed files with 3 additions and 2 deletions

View File

@ -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;