Save / restore fixes
- Don't set up and load pre-defined optional plugins in restore mode. - Remove the save/restore registration in Voodoo destructors. - TODO: Fix frozen SDL/SDL2 display after restore.
This commit is contained in:
parent
512d54cc5d
commit
a088949447
@ -2,7 +2,7 @@
|
||||
// $Id$
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002-2019 The Bochs Project
|
||||
// Copyright (C) 2002-2020 The Bochs Project
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
@ -269,9 +269,7 @@ void bx_plugin_ctrl_reset(bx_bool init_done)
|
||||
#if BX_SUPPORT_IODEBUG && BX_DEBUGGER
|
||||
new bx_param_bool_c(base, "iodebug", "", "", 1);
|
||||
#endif
|
||||
if (init_done) {
|
||||
SIM->opt_plugin_ctrl("*", 1);
|
||||
}
|
||||
SIM->opt_plugin_ctrl("*", 1);
|
||||
}
|
||||
|
||||
void bx_init_options()
|
||||
@ -363,7 +361,6 @@ void bx_init_options()
|
||||
|
||||
// optional plugin control
|
||||
new bx_list_c(menu, "plugin_ctrl", "Optional Plugin Control");
|
||||
bx_plugin_ctrl_reset(0);
|
||||
|
||||
// subtree for special menus
|
||||
bx_list_c *special_menus = new bx_list_c(root_param, "menu", "");
|
||||
|
@ -2,7 +2,7 @@
|
||||
// $Id$
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017-2018 The Bochs Project
|
||||
// Copyright (C) 2017-2020 The Bochs Project
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
@ -131,6 +131,11 @@ bx_banshee_c::bx_banshee_c() : bx_voodoo_base_c()
|
||||
{
|
||||
}
|
||||
|
||||
bx_banshee_c::~bx_banshee_c()
|
||||
{
|
||||
SIM->get_bochs_root()->remove("voodoo");
|
||||
}
|
||||
|
||||
void bx_banshee_c::init_model(void)
|
||||
{
|
||||
static char model[40];
|
||||
|
@ -2,7 +2,7 @@
|
||||
// $Id$
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2012-2019 The Bochs Project
|
||||
// Copyright (C) 2012-2020 The Bochs Project
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
@ -841,6 +841,11 @@ bx_voodoo_1_2_c::bx_voodoo_1_2_c() : bx_voodoo_base_c()
|
||||
s.mode_change_timer_id = BX_NULL_TIMER_HANDLE;
|
||||
}
|
||||
|
||||
bx_voodoo_1_2_c::~bx_voodoo_1_2_c()
|
||||
{
|
||||
SIM->get_bochs_root()->remove("voodoo");
|
||||
}
|
||||
|
||||
void bx_voodoo_1_2_c::init_model(void)
|
||||
{
|
||||
if (s.mode_change_timer_id == BX_NULL_TIMER_HANDLE) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
// $Id$
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2012-2018 The Bochs Project
|
||||
// Copyright (C) 2012-2020 The Bochs Project
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
@ -91,7 +91,7 @@ protected:
|
||||
class bx_voodoo_1_2_c : public bx_voodoo_base_c {
|
||||
public:
|
||||
bx_voodoo_1_2_c();
|
||||
virtual ~bx_voodoo_1_2_c() {}
|
||||
virtual ~bx_voodoo_1_2_c();
|
||||
virtual void init_model(void);
|
||||
virtual void reset(unsigned type);
|
||||
virtual void register_state(void);
|
||||
@ -116,7 +116,7 @@ private:
|
||||
class bx_banshee_c : public bx_voodoo_base_c {
|
||||
public:
|
||||
bx_banshee_c();
|
||||
virtual ~bx_banshee_c() {}
|
||||
virtual ~bx_banshee_c();
|
||||
virtual void init_model(void);
|
||||
virtual void reset(unsigned type);
|
||||
virtual void register_state(void);
|
||||
|
@ -60,6 +60,7 @@ bx_bool bx_gui_sighandler = 0;
|
||||
|
||||
int bx_init_main(int argc, char *argv[]);
|
||||
void bx_init_hardware(void);
|
||||
void bx_plugin_ctrl_reset(bx_bool init_done);
|
||||
void bx_init_options(void);
|
||||
void bx_init_bx_dbg(void);
|
||||
|
||||
@ -878,9 +879,10 @@ int bx_init_main(int argc, char *argv[])
|
||||
if (SIM->get_param_bool(BXPN_RESTORE_FLAG)->get()) {
|
||||
load_rcfile = 0;
|
||||
norcfile = 0;
|
||||
} else {
|
||||
// set up and load pre-defined optional plugins before parsing configuration
|
||||
bx_plugin_ctrl_reset(0);
|
||||
}
|
||||
// load pre-defined optional plugins before parsing configuration
|
||||
SIM->opt_plugin_ctrl("*", 1);
|
||||
SIM->init_save_restore();
|
||||
SIM->init_statistics();
|
||||
if (load_rcfile) {
|
||||
|
Loading…
Reference in New Issue
Block a user