Setting up muti-touch with Storyboard is relatively straight forward. In most cases you only need to pass the multi-touch device to Storyboard using the following option:
sbengine -omtdev,device=[path to touch device] your_app.gapp
Typically the touch device is labelled as
/dev/input/touch0
. You can easily verify by using the cat
utility:
cat /dev/input/touch0
Executing the above command and touching the screen should present characters to the terminal verifying you have the right device.
Usually the sbengine mtdev plugin queries and receives the correct information
from the touch device. Sometimes, due to manufacturer's not following the
correct specifications etc., the touch device does not get initialized correctly
and the touch coordinates are off. In that case you need to use the
-omtdev,calibrate
option in conjunction with the
mtcalib
application to acquire the bounds parameters for screen
calibration. To do that you will need to follow these steps:
Get the mtcalib sample from the Crank public SVN. Importing sample projects from Crank's public SVN can be found here.
Run sbengine with the mtcalib sample:
sbengine -omtdev,calibrate mtcalib.gapp
Pass the bounds information that you acquired from the mtcalib application to your original sbengine commandline:
sbengine -omtdev,device=/dev/input/touch0,bounds=0:0:32000:32000
your_app.gapp
libmtdev.so