summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/timer.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2011-02-08 06:48:39 +0000
committer Aaron Giles <aaron@aarongiles.com>2011-02-08 06:48:39 +0000
commit4f7efb1ca4bcf00edd9e519167367f44d797186c (patch)
treec9ee8aae0bc80942f118df4df24d9054504b9ad9 /src/emu/timer.c
parentf4f3adf2506ce7808363593436de5b13bb304d47 (diff)
Moved the state saving system to C++. For now the registration macros
are still intact. The new state_manager class has templatized methods for saving the various types, and through template specialization can save more complex system types cleanly (like bitmaps and attotimes). Added new mechanism to detect proper state save types. This is much more strict and there will likely be some games/devices that fatalerror at startup until they are remedied. Spot checking has caught the more common situations. The new state_manager is embedded directly in the running_machine, allowing objects to register state saving in their constructors now. Added NAME() macro which is a generalization of FUNC() and can be used to wrap variables that are registered when directly using the new methods as opposed to the previous macros. For example: machine->state().save_item(NAME(global_item)) Added methods in the device_t class that implicitly register state against the current device, making for a cleaner interface. Just a couple of required regexes for now: state_save_register_postload( *)\(( *)([^,;]+), * \3->state().register_postload\1\(\2 state_save_register_presave( *)\(( *)([^,;]+), * \3->state().register_presave\1\(\2
Diffstat (limited to 'src/emu/timer.c')
-rw-r--r--src/emu/timer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/emu/timer.c b/src/emu/timer.c
index 1d0e3af8525..698f01345fc 100644
--- a/src/emu/timer.c
+++ b/src/emu/timer.c
@@ -286,7 +286,7 @@ void timer_device::device_start()
m_timer = timer_alloc();
// register for save states
- state_save_register_device_item(this, 0, m_first_time);
+ save_item(NAME(m_first_time));
}