- Add special case for power button so that it is always fatal.

a GUI panic.
This commit is contained in:
Bryce Denney 2001-06-15 18:01:52 +00:00
parent d165585a77
commit cee98e0033

View File

@ -166,8 +166,12 @@ bx_gui_c::reset_handler(void)
void void
bx_gui_c::power_handler(void) bx_gui_c::power_handler(void)
{ {
BX_PANIC(("POWER button turned off.")); // the user pressed power button, so there's no doubt they want bochs
// exit the simulator even if panic did not actually quit. // to quit. Change panics to fatal for the GUI and then do a panic.
LOG_THIS setonoff(LOGLEV_PANIC, ACT_FATAL);
BX_PANIC (("POWER button turned off."));
// shouldn't reach this point, but if you do, QUIT!!!
fprintf (stderr, "Bochs is exiting because you pressed the power button.\n");
::exit (1); ::exit (1);
} }