Implement API to terminate current emulator session from within main
emulator thread (ie soft power off).
This commit is contained in:
parent
8f04c11a76
commit
00034c1ece
10 changed files with 39 additions and 2 deletions
|
|
@ -79,7 +79,10 @@ static void piix_pm_write(uint16_t port, uint8_t val, void *p)
|
|||
{
|
||||
pclog("PIIX transition to power state %i\n", (val >> 2) & 7);
|
||||
if (val == 0x20)
|
||||
fatal("Power off\n");
|
||||
{
|
||||
pclog("Power off\n");
|
||||
stop_emulation_now();
|
||||
}
|
||||
}
|
||||
piix->pm.pmcntrl = (piix->pm.pmcntrl & ~0xff00) | ((val & 0x1c) << 8);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue