mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-14 19:56:25 +00:00
Added option to swap left and right mouse buttons
Changed the use of SDL buttons to Moonlight buttons definitions
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user