Added option to swap left and right mouse buttons
Changed the use of SDL buttons to Moonlight buttons definitions
This commit is contained in:
parent
5755afc4ea
commit
89319dc7aa
7 changed files with 37 additions and 0 deletions
|
|
@ -55,6 +55,14 @@ void SdlInputHandler::handleMouseButtonEvent(SDL_MouseButtonEvent* event)
|
|||
return;
|
||||
}
|
||||
|
||||
if (m_SwapMouseButtons) {
|
||||
if (button == BUTTON_RIGHT)
|
||||
button = BUTTON_LEFT;
|
||||
else if (button == BUTTON_LEFT)
|
||||
button = BUTTON_RIGHT;
|
||||
}
|
||||
|
||||
|
||||
LiSendMouseButtonEvent(event->state == SDL_PRESSED ?
|
||||
BUTTON_ACTION_PRESS :
|
||||
BUTTON_ACTION_RELEASE,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue