From 5323b7e1bdf5c505ec898ff367a08c6277adab7f Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Mon, 9 Nov 2020 04:50:51 +0500 Subject: [PATCH] Properly shut down the emulator on ACPI soft power off. --- src/acpi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/acpi.c b/src/acpi.c index 75225daaf..d8bb4ee09 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -28,6 +28,7 @@ #include <86box/io.h> #include <86box/pci.h> #include <86box/pic.h> +#include <86box/plat.h> #include <86box/timer.h> #include <86box/keyboard.h> #include <86box/nvr.h> @@ -448,7 +449,7 @@ acpi_reg_write_common_regs(int size, uint16_t addr, uint8_t val, void *p) switch (sus_typ) { case 0: /* Soft power off. */ - exit(-1); + quited = 1; break; case 1: /* Suspend to RAM. */