summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/input/input_rawinput.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2024-04-26 06:26:22 +1000
committer Vas Crabb <vas@vastheman.com>2024-04-26 06:26:22 +1000
commitf91b896cda8343fc41f069b32b7ef527364bdea1 (patch)
tree105ca2e24d44ae9ceac3f540abf07b4f00086cde /src/osd/modules/input/input_rawinput.cpp
parent3b618bd7f04b8164fbcbb1fc106502e05ee85d6a (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_rawinput.cpp')
-rw-r--r--src/osd/modules/input/input_rawinput.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/osd/modules/input/input_rawinput.cpp b/src/osd/modules/input/input_rawinput.cpp
index 437abf598a4..1bcbb38f781 100644
--- a/src/osd/modules/input/input_rawinput.cpp
+++ b/src/osd/modules/input/input_rawinput.cpp
@@ -749,14 +749,14 @@ protected:
rawinputdevice.hDevice);
}
- 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)
{
// handle raw input data
case INPUT_EVENT_RAWINPUT:
{
- HRAWINPUT const rawinputdevice = *static_cast<HRAWINPUT *>(eventdata);
+ HRAWINPUT const rawinputdevice = *reinterpret_cast<HRAWINPUT const *>(eventdata);
union { RAWINPUT r; BYTE b[4096]; } small_buffer;
std::unique_ptr<BYTE []> larger_buffer;
@@ -786,7 +786,7 @@ protected:
{
std::lock_guard<std::mutex> scope_lock(m_module_lock);
- auto *input = reinterpret_cast<RAWINPUT *>(data);
+ auto *const input = reinterpret_cast<RAWINPUT const *>(data);
if (!input->header.hDevice)
return false;
@@ -809,7 +809,7 @@ protected:
case INPUT_EVENT_ARRIVAL:
{
- HRAWINPUT const rawinputdevice = *static_cast<HRAWINPUT *>(eventdata);
+ HRAWINPUT const rawinputdevice = *reinterpret_cast<HRAWINPUT const *>(eventdata);
// determine the length of the device name, allocate it, and fetch it if not nameless
UINT name_length = 0;
@@ -842,7 +842,7 @@ protected:
case INPUT_EVENT_REMOVAL:
{
- HRAWINPUT const rawinputdevice = *static_cast<HRAWINPUT *>(eventdata);
+ HRAWINPUT const rawinputdevice = *reinterpret_cast<HRAWINPUT const *>(eventdata);
std::lock_guard<std::mutex> scope_lock(m_module_lock);