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: Christian Beier <dontmind@freeshell.org>
pull/1/head
ckanru 13 years ago committed by Christian Beier
parent b6d24bfa11
commit 5be89ead01

@ -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));

Loading…
Cancel
Save