diff options
author | 2011-05-30 19:07:19 +0000 | |
---|---|---|
committer | 2011-05-30 19:07:19 +0000 | |
commit | 665d213ee424496f94702f3643c69b3d85129556 (patch) | |
tree | 45bfdcb86bf3950084fc54d512827331d4e48934 /src/emu/sound/k054539.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/sound/k054539.c')
-rw-r--r-- | src/emu/sound/k054539.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/emu/sound/k054539.c b/src/emu/sound/k054539.c index b8fce4affe6..75acd6caa5b 100644 --- a/src/emu/sound/k054539.c +++ b/src/emu/sound/k054539.c @@ -384,7 +384,7 @@ else double gc_f0; int gc_i, gc_j, gc_k, gc_l; - if (input_code_pressed_once(device->machine(), KEYCODE_DEL_PAD)) + if (device->machine().input().code_pressed_once(KEYCODE_DEL_PAD)) { gc_active ^= 1; if (!gc_active) popmessage(NULL); @@ -392,23 +392,23 @@ else if (gc_active) { - if (input_code_pressed_once(device->machine(), KEYCODE_0_PAD)) gc_chip ^= 1; + if (device->machine().input().code_pressed_once(KEYCODE_0_PAD)) gc_chip ^= 1; gc_i = gc_pos[gc_chip]; gc_j = 0; - if (input_code_pressed_once(device->machine(), KEYCODE_4_PAD)) { gc_i--; gc_j = 1; } - if (input_code_pressed_once(device->machine(), KEYCODE_6_PAD)) { gc_i++; gc_j = 1; } + if (device->machine().input().code_pressed_once(KEYCODE_4_PAD)) { gc_i--; gc_j = 1; } + if (device->machine().input().code_pressed_once(KEYCODE_6_PAD)) { gc_i++; gc_j = 1; } if (gc_j) { gc_i &= 7; gc_pos[gc_chip] = gc_i; } - if (input_code_pressed_once(device->machine(), KEYCODE_5_PAD)) + if (device->machine().input().code_pressed_once(KEYCODE_5_PAD)) info->k054539_gain[gc_i] = 1.0; else { gc_fptr = &info->k054539_gain[gc_i]; gc_f0 = *gc_fptr; gc_j = 0; - if (input_code_pressed_once(device->machine(), KEYCODE_2_PAD)) { gc_f0 -= 0.1; gc_j = 1; } - if (input_code_pressed_once(device->machine(), KEYCODE_8_PAD)) { gc_f0 += 0.1; gc_j = 1; } + if (device->machine().input().code_pressed_once(KEYCODE_2_PAD)) { gc_f0 -= 0.1; gc_j = 1; } + if (device->machine().input().code_pressed_once(KEYCODE_8_PAD)) { gc_f0 += 0.1; gc_j = 1; } if (gc_j) { if (gc_f0 < 0) gc_f0 = 0; *gc_fptr = gc_f0; } } |