Commit 5be89ead authored by ckanru's avatar ckanru Committed by Christian Beier

Fixes running vncserver on beagleboard/0xdroid and possibly any device

without a touch screen. Because fake touch screen always report
zero when query device information, coordinates transformation is not
needed.
Signed-off-by: 's avatarChristian Beier <dontmind@freeshell.org>
...@@ -309,8 +309,12 @@ void injectTouchEvent(int down, int x, int y) ...@@ -309,8 +309,12 @@ void injectTouchEvent(int down, int x, int y)
struct input_event ev; struct input_event ev;
// Calculate the final x and y // Calculate the final x and y
x = xmin + (x * (xmax - xmin)) / (scrinfo.xres); /* Fake touch screen always reports zero */
y = ymin + (y * (ymax - ymin)) / (scrinfo.yres); if (xmin != 0 && xmax != 0 && ymin != 0 && ymax != 0)
{
x = xmin + (x * (xmax - xmin)) / (scrinfo.xres);
y = ymin + (y * (ymax - ymin)) / (scrinfo.yres);
}
memset(&ev, 0, sizeof(ev)); memset(&ev, 0, sizeof(ev));
......
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