From 22fac3c4dee3a9ed55d29ef56968ba959d6c3d8d Mon Sep 17 00:00:00 2001 From: theropfather Date: Sun, 24 Jun 2018 22:40:34 +0100 Subject: [PATCH] Add fixes for detecting mouse and ignoring character mapping for clicks. Nick12's work, on therops machine :) --- src/arch/InputHandler/InputHandler_MacOSX_HID.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/arch/InputHandler/InputHandler_MacOSX_HID.cpp b/src/arch/InputHandler/InputHandler_MacOSX_HID.cpp index 019e24160f..4133e9f816 100644 --- a/src/arch/InputHandler/InputHandler_MacOSX_HID.cpp +++ b/src/arch/InputHandler/InputHandler_MacOSX_HID.cpp @@ -173,10 +173,8 @@ static HIDDevice *MakeDevice( InputDevice id ) { if( id == DEVICE_KEYBOARD ) return new KeyboardDevice; - /* if( id == DEVICE_MOUSE ) return new MouseDevice; - */ if( IsJoystick(id) ) return new JoystickDevice; if( IsPump(id) ) @@ -248,6 +246,8 @@ InputHandler_MacOSX_HID::InputHandler_MacOSX_HID() : m_Sem( "Input thread starte LOG->Trace( "Finding keyboards" ); AddDevices( kHIDPage_GenericDesktop, kHIDUsage_GD_Keyboard, id ); + id = DEVICE_MOUSE; + LOG->Trace( "Finding mice" ); AddDevices( kHIDPage_GenericDesktop, kHIDUsage_GD_Mouse, id ); @@ -430,6 +430,14 @@ wchar_t InputHandler_MacOSX_HID::DeviceButtonToChar( DeviceButton button, bool b case KEY_DOWN: case KEY_LEFT: case KEY_RIGHT: + case MOUSE_LEFT: + case MOUSE_RIGHT: + case MOUSE_WHEELDOWN: + case MOUSE_WHEELUP: + case MOUSE_Y_UP: + case MOUSE_Y_DOWN: + case MOUSE_X_LEFT: + case MOUSE_X_RIGHT: case KEY_ESC: case KEY_TAB: case KEY_ENTER: