summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/state.h
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2010-12-02 17:26:38 +0000
committer Aaron Giles <aaron@aarongiles.com>2010-12-02 17:26:38 +0000
commit57ef3a5ed673acfbd93eb4f759b58f5d813c4db5 (patch)
tree4acce003c8c739c1e86e634b8a77b7a393c6ea9c /src/emu/state.h
parent3c55c6743652d2f8e82a8f8e78e64e52838f08ba (diff)
Split the screen device into a separate module.
Converted global video routines into a video_manager. Moved video manager initialization earlier in startup.
Diffstat (limited to 'src/emu/state.h')
-rw-r--r--src/emu/state.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/emu/state.h b/src/emu/state.h
index e8114eb6ac5..6ed3c887855 100644
--- a/src/emu/state.h
+++ b/src/emu/state.h
@@ -56,6 +56,21 @@ typedef enum _state_save_error state_save_error;
#define STATE_POSTLOAD(name) void name(running_machine *machine, void *param)
+template<class T, void (T::*func)()>
+void state_presave_stub(running_machine *machine, void *param)
+{
+ T *target = reinterpret_cast<T *>(param);
+ (target->*func)();
+}
+
+template<class T, void (T::*func)()>
+void state_postload_stub(running_machine *machine, void *param)
+{
+ T *target = reinterpret_cast<T *>(param);
+ (target->*func)();
+}
+
+
#ifdef __GNUC__
#define IS_VALID_SAVE_TYPE(_var) \
(std::tr1::is_arithmetic<typeof(_var)>::value || std::tr1::is_enum<typeof(_var)>::value || \