- check if CMOS plugin has been loaded before calling save_image() (fixes double
panic if Bochs fails early)
This commit is contained in:
parent
a9b2c4c858
commit
d86c22fa20
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: pc_system.cc,v 1.45 2005-12-04 17:43:08 vruppert Exp $
|
||||
// $Id: pc_system.cc,v 1.46 2005-12-26 17:16:32 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -221,7 +221,8 @@ Bit8u bx_pc_system_c::IAC(void)
|
||||
|
||||
void bx_pc_system_c::exit(void)
|
||||
{
|
||||
DEV_cmos_save_image();
|
||||
if (DEV_cmos_present())
|
||||
DEV_cmos_save_image();
|
||||
if (DEV_hd_present())
|
||||
DEV_hd_close_harddrive();
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: plugin.h,v 1.45 2005-12-04 17:43:09 vruppert Exp $
|
||||
// $Id: plugin.h,v 1.46 2005-12-26 17:16:32 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This file provides macros and types needed for plugins. It is based on
|
||||
@ -102,6 +102,7 @@ extern "C" {
|
||||
#define DEV_cmos_checksum() (bx_devices.pluginCmosDevice->checksum_cmos())
|
||||
#define DEV_cmos_get_timeval() (bx_devices.pluginCmosDevice->get_timeval())
|
||||
#define DEV_cmos_save_image() (bx_devices.pluginCmosDevice->save_image())
|
||||
#define DEV_cmos_present() (bx_devices.pluginCmosDevice != &bx_devices.stubCmos)
|
||||
|
||||
///////// keyboard macros
|
||||
#define DEV_mouse_motion(dx, dy, state) \
|
||||
|
Loading…
Reference in New Issue
Block a user