Remove set_preload_settings(), do the things at ROM load if needed
This commit is contained in:
parent
af070537cf
commit
85a766f560
4 changed files with 6 additions and 16 deletions
|
@ -14,8 +14,6 @@
|
|||
|
||||
//Do basic core initialization (to get it to stable state).
|
||||
void do_basic_core_init();
|
||||
//Set preload settings.
|
||||
void set_preload_settings();
|
||||
//Install handler.
|
||||
void core_install_handler();
|
||||
//Uninstall handler.
|
||||
|
|
|
@ -476,6 +476,8 @@ namespace
|
|||
|
||||
snes_term();
|
||||
snes_unload_cartridge();
|
||||
SNES::config.random = false;
|
||||
SNES::config.expansion_port = SNES::System::ExpansionPortDevice::None;
|
||||
bool r = fun(img);
|
||||
if(r)
|
||||
internal_rom = ctype;
|
||||
|
@ -1084,6 +1086,10 @@ void core_uninstall_handler()
|
|||
|
||||
void do_basic_core_init()
|
||||
{
|
||||
static bool done = false;
|
||||
if(done)
|
||||
return;
|
||||
done = true;
|
||||
static my_interfaced i;
|
||||
SNES::interface = &i;
|
||||
}
|
||||
|
@ -1100,13 +1106,6 @@ std::set<std::string> get_sram_set()
|
|||
return r;
|
||||
}
|
||||
|
||||
void set_preload_settings()
|
||||
{
|
||||
SNES::config.random = false;
|
||||
SNES::config.expansion_port = SNES::System::ExpansionPortDevice::None;
|
||||
}
|
||||
|
||||
|
||||
void core_request_reset(long delay)
|
||||
{
|
||||
do_reset_flag = delay;
|
||||
|
|
|
@ -407,10 +407,6 @@ void do_basic_core_init()
|
|||
instance->set_walltime_fn(walltime_fn);
|
||||
}
|
||||
|
||||
void set_preload_settings()
|
||||
{
|
||||
}
|
||||
|
||||
void core_install_handler()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -237,7 +237,6 @@ void do_load_beginning(bool reload) throw(std::bad_alloc, std::runtime_error)
|
|||
messages << "Can't load movie without a ROM" << std::endl;
|
||||
return;
|
||||
}
|
||||
set_preload_settings();
|
||||
|
||||
//Negative return.
|
||||
if(!reload) {
|
||||
|
@ -322,8 +321,6 @@ void do_load_state(struct moviefile& _movie, int lmode)
|
|||
if(!rom_ok)
|
||||
throw std::runtime_error("Incorrect ROM");
|
||||
|
||||
set_preload_settings();
|
||||
|
||||
if(lmode == LOAD_STATE_CURRENT && movb.get_movie().readonly_mode() && readonly_load_preserves)
|
||||
lmode = LOAD_STATE_PRESERVE;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue