diff options
Diffstat (limited to 'src/emu/netlist/pstate.c')
-rw-r--r-- | src/emu/netlist/pstate.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/emu/netlist/pstate.c b/src/emu/netlist/pstate.c index 6dfa6c62527..5b50b6dbceb 100644 --- a/src/emu/netlist/pstate.c +++ b/src/emu/netlist/pstate.c @@ -27,7 +27,7 @@ ATTR_COLD void pstate_manager_t::save_state_ptr(const pstring &stname, const pst }; NL_VERBOSE_OUT(("SAVE: <%s> %s(%d) %p\n", fullname.cstr(), ts[dt].cstr(), size, ptr)); - pstate_entry_t *p = new pstate_entry_t(stname, dt, owner, size, count, ptr, is_ptr); + pstate_entry_t *p = nl_alloc(pstate_entry_t, stname, dt, owner, size, count, ptr, is_ptr); m_save.add(p); } @@ -60,3 +60,11 @@ ATTR_COLD void pstate_manager_t::post_load() if (m_save[i]->m_dt == DT_CUSTOM) m_save[i]->m_callback->on_post_load(); } + +template<> ATTR_COLD void pstate_manager_t::save_item(pstate_callback_t &state, const void *owner, const pstring &stname) +{ + //save_state_ptr(stname, DT_CUSTOM, 0, 1, &state); + pstate_entry_t *p = nl_alloc(pstate_entry_t, stname, owner, &state); + m_save.add(p); + state.register_state(*this, stname); +} |