diff options
author | 2010-12-02 17:26:38 +0000 | |
---|---|---|
committer | 2010-12-02 17:26:38 +0000 | |
commit | 57ef3a5ed673acfbd93eb4f759b58f5d813c4db5 (patch) | |
tree | 4acce003c8c739c1e86e634b8a77b7a393c6ea9c /src/emu/state.h | |
parent | 3c55c6743652d2f8e82a8f8e78e64e52838f08ba (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.h | 15 |
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 || \ |