diff options
author | Aaron Giles <aaron@aarongiles.com> | 2011-05-30 19:07:19 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2011-05-30 19:07:19 +0000 |
commit | 665d213ee424496f94702f3643c69b3d85129556 (patch) | |
tree | 45bfdcb86bf3950084fc54d512827331d4e48934 /src/emu/mconfig.c | |
parent | 8f7d456e70ae1caeda6f5573bd2e7d93e26cec9e (diff) |
(Finally found the time to finish this....)
Low-level input upgrade. Classes now exist for input_codes, input_items,
input_devices, and input_seqs. Also created an input_manager class to
hold machine-global state and made it accessible via machine.input().
Expanded the device index range (0-255, up from 0-16), and the OSD can
now specify the device index explicitly if they can better keep the
indexes from varying run-to-run. [Aaron Giles]
Note that I've built and run SDL on Windows, but not all the code paths
were exercised. If you use mice/joysticks extensively double-check them
to be sure it all still works as expected.
This is mainly an OSD and core change. The only thing impacting drivers
is if they query for specific keys for debugging. The following S&Rs
took care of most of that:
S: input_code_pressed( *)\(( *)([^, ]+) *, *
R: \3\.input\(\)\.code_pressed\1\(\2
S: input_code_pressed_once( *)\(( *)([^, ]+) *, *
R: \3\.input\(\)\.code_pressed_once\1\(\2
Diffstat (limited to 'src/emu/mconfig.c')
-rw-r--r-- | src/emu/mconfig.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/emu/mconfig.c b/src/emu/mconfig.c index 5313ddbee3f..e3e6e971b0f 100644 --- a/src/emu/mconfig.c +++ b/src/emu/mconfig.c @@ -71,19 +71,18 @@ machine_config::machine_config(const game_driver &gamedrv, emu_options &options) device_slot_interface *slot = NULL; for (bool gotone = m_devicelist.first(slot); gotone; gotone = slot->next(slot)) { - device_t &owner = slot->device(); const slot_interface *intf = slot->get_slot_interfaces(); if (intf != NULL) { - const char *selval = options.value(owner.tag()); - if (options.seqid(owner.tag())==0) { + device_t &owner = slot->device(); + const char *selval = options.value(owner.tag()); + if (options.seqid(owner.tag()) == 0) selval = slot->get_default_card(); - } - if (selval) { + + if (selval != NULL) for (int i = 0; intf[i].name != NULL; i++) if (strcmp(selval, intf[i].name) == 0) device_add(&owner, intf[i].name, intf[i].devtype, 0); - } } } |