summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/input/input_rawinput.cpp
diff options
context:
space:
mode:
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);