Fix HID issues
Mixed type HID report descriptor in the current trunk doesn't work
well so this patch fixes the HID creation logic to make it use
composite configuration which has separated keyboard and mouse
HID descriptor using a single USB port.
ikvm service also should be changed using below setting after
applying this patch:
ExecStart=/usr/bin/env obmc-ikvm -v /dev/video0 -k /dev/hidg0 -p /dev/hidg1
Change-Id: I9b2975f4fdade2c6030def829951d02b24bea562
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
diff --git a/ikvm_server.hpp b/ikvm_server.hpp
index ff51cfc..b806201 100644
--- a/ikvm_server.hpp
+++ b/ikvm_server.hpp
@@ -105,7 +105,7 @@
/* @brief Number of frames handled since a client connected */
int frameCounter;
/* @brief Number of connected clients */
- int numClients;
+ unsigned int numClients;
/* @brief Microseconds to process RFB events every frame */
long int processTime;
/* @brief Handle to the RFB server object */
@@ -116,6 +116,52 @@
Video& video;
/* @brief Default framebuffer storage */
std::vector<char> framebuffer;
+ /* @brief Cursor bitmap width */
+ static constexpr int cursorWidth = 20;
+ /* @brief Cursor bitmap height */
+ static constexpr int cursorHeight = 20;
+ /* @brief Cursor bitmap */
+ static constexpr char cursor[] = " "
+ " x "
+ " xx "
+ " xxx "
+ " xxxx "
+ " xxxxx "
+ " xxxxxx "
+ " xxxxxxx "
+ " xxxxxxxx "
+ " xxxxxxxxx "
+ " xxxxxxxxxx "
+ " xxxxxxxxxxx "
+ " xxxxxxx "
+ " xxxxxxx "
+ " xxx xxx "
+ " xx xxx "
+ " x xxx "
+ " xxx "
+ " x "
+ " ";
+ /* @brief Cursor bitmap mask */
+ static constexpr char cursorMask[] = " o "
+ "oxo "
+ "oxxo "
+ "oxxxo "
+ "oxxxxo "
+ "oxxxxxo "
+ "oxxxxxxo "
+ "oxxxxxxxo "
+ "oxxxxxxxxo "
+ "oxxxxxxxxxo "
+ "oxxxxxxxxxxo "
+ "oxxxxxxxxxxxo "
+ "oxxxxxxxoooo "
+ "oxxxxxxxo "
+ "oxxxooxxxo "
+ "oxxo oxxxo "
+ "oxo oxxxo "
+ " o oxxxo "
+ " oxo "
+ " o ";
};
} // namespace ikvm