diff options
author | 2024-04-26 06:26:22 +1000 | |
---|---|---|
committer | 2024-04-26 06:26:22 +1000 | |
commit | f91b896cda8343fc41f069b32b7ef527364bdea1 (patch) | |
tree | 105ca2e24d44ae9ceac3f540abf07b4f00086cde /src/osd/modules/input/input_win32.cpp | |
parent | 3b618bd7f04b8164fbcbb1fc106502e05ee85d6a (diff) |
input/input_sdl.cpp: Added an SDL lightgun provider.
This does essentially the same thing as the Win32 lightgun provider,
mapping the absolute pointer position over the window to gun axes.
Also added a bunch of const in the windows input handling code.
docs: Bumped version, as features that are not in a releaesd version of
MAME are now documented.
Diffstat (limited to 'src/osd/modules/input/input_win32.cpp')
-rw-r--r-- | src/osd/modules/input/input_win32.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/osd/modules/input/input_win32.cpp b/src/osd/modules/input/input_win32.cpp index 49c211740c0..a6740979c16 100644 --- a/src/osd/modules/input/input_win32.cpp +++ b/src/osd/modules/input/input_win32.cpp @@ -105,14 +105,14 @@ public: create_device<win32_keyboard_device>(DEVICE_CLASS_KEYBOARD, "Win32 Keyboard 1", "Win32 Keyboard 1"); } - virtual bool handle_input_event(input_event eventid, void *eventdata) override + virtual bool handle_input_event(input_event eventid, void const *eventdata) override { switch (eventid) { case INPUT_EVENT_KEYDOWN: case INPUT_EVENT_KEYUP: devicelist().for_each_device( - [args = static_cast<KeyPressEventArgs const *>(eventdata)] (auto &device) + [args = reinterpret_cast<KeyPressEventArgs const *>(eventdata)] (auto &device) { device.queue_events(args, 1); }); @@ -276,13 +276,13 @@ public: create_device<win32_mouse_device>(DEVICE_CLASS_MOUSE, "Win32 Mouse 1", "Win32 Mouse 1"); } - virtual bool handle_input_event(input_event eventid, void *eventdata) override + virtual bool handle_input_event(input_event eventid, void const *eventdata) override { if (manager().class_enabled(DEVICE_CLASS_MOUSE)) { if ((eventid == INPUT_EVENT_MOUSE_BUTTON) || (eventid == INPUT_EVENT_MOUSE_WHEEL)) { - auto const *const args = reinterpret_cast<MouseUpdateEventArgs *>(eventdata); + auto const *const args = reinterpret_cast<MouseUpdateEventArgs const *>(eventdata); devicelist().for_each_device( [args] (auto &device) { device.queue_events(args, 1); }); return true; @@ -537,13 +537,13 @@ public: } } - virtual bool handle_input_event(input_event eventid, void *eventdata) override + virtual bool handle_input_event(input_event eventid, void const *eventdata) override { if (manager().class_enabled(DEVICE_CLASS_LIGHTGUN)) { if ((eventid == INPUT_EVENT_MOUSE_BUTTON) || (eventid == INPUT_EVENT_MOUSE_WHEEL)) { - auto const *const args = reinterpret_cast<MouseUpdateEventArgs *>(eventdata); + auto const *const args = reinterpret_cast<MouseUpdateEventArgs const *>(eventdata); devicelist().for_each_device( [args] (auto &device) { device.queue_events(args, 1); }); return true; |