Commit 161f357f authored by Teemu Erkkola's avatar Teemu Erkkola

Swap left/right nub click handling to match received events

parent 59f62cb2
......@@ -348,18 +348,18 @@ void handle(input_event const& e, unsigned int role) {
break;
case EV_KEY:
switch(e.code) {
case BTN_LEFT: // mouse click
case BTN_LEFT: // Right nub click
if (role == ROLE_GPIO && global.settings.exportMouse) {
handleNubClick(global.settings.leftNubClickMode, e.value, global.mouse, global.gamepad, global.settings);
handleNubClick(global.settings.rightNubClickMode, e.value, global.mouse, global.gamepad, global.settings);
if (global.settings.exportGamepad) {
global.gamepad->send(EV_KEY, BTN_THUMBL, e.value);
global.gamepad->send(EV_SYN, 0, 0);
}
}
break;
case BTN_RIGHT:
case BTN_RIGHT: // Left nub click
if (role == ROLE_GPIO && global.settings.exportMouse) {
handleNubClick(global.settings.rightNubClickMode, e.value, global.mouse, global.gamepad, global.settings);
handleNubClick(global.settings.leftNubClickMode, e.value, global.mouse, global.gamepad, global.settings);
if (global.settings.exportGamepad) {
global.gamepad->send(EV_KEY, BTN_THUMBR, e.value);
global.gamepad->send(EV_SYN, 0, 0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment