FB GUI Touchscreen Calibration

The touchscreen drivers (like "usbtouchscreen") provide raw data from the devices. It is up to the user space program to translate this data to screen coordinates. Normally this is done by the X server so this conversion needs to be done internally by Gnash itself.

The current implementation uses a very simple 2-point calibration where the first point is at one fifth of the screen width and height and the second point is at the exact opposite part of the screen (at it's lower right). The SWF file calibrate.swf provides a simple graphical reference for 4:3 sized screens (don't use it for other formats!).

With the current preliminary implementation it's a bit uncomfortable to do the calibration:

1) starting gnash with DUMP_RAW environment variable will show raw coordinates on STDOUT: DUMP_RAW=1 gnash calibrate.swf

2) Keep touching the upper left reference point for a while. You'll get lots of (similar) coordinates printed. Choose a X/Y coordinate pair you think is the best one (ie. the average) and write it down.

3) Do the same for the lower right reference point.

From now on, start gnash with the TSCALIB enivronment variable set to the coordinates you just found out. Write the coordinates separated by commas (X,Y,X,Y), like this: TSCALIB=491,1635,1581,639 gnash yourmovie.swf