Fix middle and right mouse button swapped

Fixes #235
This commit is contained in:
Kovid Goyal 2017-12-18 05:48:51 +05:30
parent c8d5f232b3
commit 8018024cb7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -25,12 +25,12 @@ typedef enum MouseActions { PRESS, RELEASE, DRAG, MOVE } MouseAction;
static inline unsigned int
button_map(int button) {
switch(button) {
case GLFW_MOUSE_BUTTON_1:
case GLFW_MOUSE_BUTTON_LEFT:
return 0;
case GLFW_MOUSE_BUTTON_2:
return 1;
case GLFW_MOUSE_BUTTON_3:
case GLFW_MOUSE_BUTTON_RIGHT:
return 2;
case GLFW_MOUSE_BUTTON_MIDDLE:
return 1;
case GLFW_MOUSE_BUTTON_4:
return EXTRA_BUTTON_INDICATOR;
case GLFW_MOUSE_BUTTON_5: