Skip to content

Commit

Permalink
Add fixes for detecting mouse and ignoring character mapping for clicks.
Browse files Browse the repository at this point in the history
Nick12's work, on therops machine :)
  • Loading branch information
TheROPFather committed Jun 24, 2018
1 parent 3c5349a commit 22fac3c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/arch/InputHandler/InputHandler_MacOSX_HID.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) )
Expand Down Expand Up @@ -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 );

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 22fac3c

Please sign in to comment.