Previous 15994 Revisions Next

r15092 Friday 4th May, 2012 at 13:30:17 UTC by Miodrag Milanović
Import of r16180 from MAME (no whatsnew)
[src/emu]ioport.c ioport.h

src/emu/ioport.c
r15091r15092
25962596{
25972597   // add an exit callback and a frame callback
25982598   machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(ioport_manager::exit), this));
2599   machine().add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(FUNC(ioport_manager::frame_update), this));
2599   machine().add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(FUNC(ioport_manager::frame_update_callback), this));
26002600
26012601   // initialize the default port info from the OSD
26022602   init_port_types();
r15091r15092
29392939
29402940
29412941//-------------------------------------------------
2942//  frame_update - core logic for per-frame input
2943//  port updating
2942//  frame_update - callback for once/frame updating
29442943//-------------------------------------------------
29452944
2946void ioport_manager::frame_update()
2945void ioport_manager::frame_update_callback()
29472946{
29482947   // if we're paused, don't do anything
2949   if (machine().paused())
2950      return;
2948   if (!machine().paused())
2949      frame_update();
2950}
29512951
2952
2953//-------------------------------------------------
2954//  frame_update_internal - core logic for
2955//   per-frame input port updating
2956//-------------------------------------------------
2957
2958void ioport_manager::frame_update()
2959{
29522960g_profiler.start(PROFILER_INPUT);
29532961
29542962   // record/playback information about the current frame
src/emu/ioport.h
r15091r15092
12581258   ioport_value frame_interpolate(ioport_value oldval, ioport_value newval);
12591259   ioport_type token_to_input_type(const char *string, int &player) const;
12601260   const char *input_type_to_token(astring &string, ioport_type type, int player);
1261   void frame_update();
12621261
12631262private:
12641263   // internal helpers
12651264   void init_port_types();
12661265   void init_autoselect_devices(int type1, int type2, int type3, const char *option, const char *ananame);
12671266
1267   void frame_update_callback();
1268   void frame_update();
1269
12681270   ioport_port *port(const char *tag) const { return m_portlist.find(tag); }
12691271   void exit();
12701272   input_seq_type token_to_seq_type(const char *string);

Previous 15994 Revisions Next


© 1998-2018 The MESS Team