Fix mouse button mapping issue

Mapping of a mouse button event delivered from libvncserver is
different from HID gadget driver so this patch swaps bit position 1
and 2 to map center and right button correctly.

Tested: KVM mouse buttons worked correctly.

Change-Id: Ia1771df6763b906b5cff3041df9095e0c72c892b
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
diff --git a/ikvm_input.cpp b/ikvm_input.cpp
index 71e5b7f..fbe917b 100644
--- a/ikvm_input.cpp
+++ b/ikvm_input.cpp
@@ -134,7 +134,8 @@
     Server* server = (Server*)cl->screen->screenData;
     const Video& video = server->getVideo();
 
-    input->pointerReport[0] = buttonMask & 0xFF;
+    input->pointerReport[0] = ((buttonMask & 0x4) >> 1) |
+                              ((buttonMask & 0x2) << 1) | (buttonMask & 0x1);
 
     if (x >= 0 && (unsigned int)x < video.getWidth())
     {