diff options
author | 2012-05-04 12:45:20 +0000 | |
---|---|---|
committer | 2012-05-04 12:45:20 +0000 | |
commit | 26d4fc6b3ac3da0bf561498dbfa4193a543c0111 (patch) | |
tree | deb502c14f23b69c776238b7c61066fbc7e72c14 /src/emu/ioport.c | |
parent | 5bae0429db5666fafebd8477c881d23290d07b09 (diff) |
Fix issue where initial values are not set up correctly.
Diffstat (limited to 'src/emu/ioport.c')
-rw-r--r-- | src/emu/ioport.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/emu/ioport.c b/src/emu/ioport.c index 2341aa9a51c..9ebc0fe9d25 100644 --- a/src/emu/ioport.c +++ b/src/emu/ioport.c @@ -2596,7 +2596,7 @@ time_t ioport_manager::initialize() { // add an exit callback and a frame callback machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(ioport_manager::exit), this)); - machine().add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(FUNC(ioport_manager::frame_update), this)); + machine().add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(FUNC(ioport_manager::frame_update_callback), this)); // initialize the default port info from the OSD init_port_types(); @@ -2939,16 +2939,24 @@ digital_joystick &ioport_manager::digjoystick(int player, int number) //------------------------------------------------- -// frame_update - core logic for per-frame input -// port updating +// frame_update - callback for once/frame updating //------------------------------------------------- -void ioport_manager::frame_update() +void ioport_manager::frame_update_callback() { // if we're paused, don't do anything - if (machine().paused()) - return; + if (!machine().paused()) + frame_update(); +} + +//------------------------------------------------- +// frame_update_internal - core logic for +// per-frame input port updating +//------------------------------------------------- + +void ioport_manager::frame_update() +{ g_profiler.start(PROFILER_INPUT); // record/playback information about the current frame |