Quote:
Originally Posted by sogaiu
mdp's Monitor Mod + script to interpret touch info via adb almost works -- it's almost because of the black bands (coordinates are off because of the black bands)
|
Have you tried:
-- adding the aspect ratio to the model (duly, since you can meet 1920x1080 or 1280x1024 etc.):
proportion = min( res_w_desktop / res_w_tablet , res_h_desktop / res_h_tablet );
offset_x = (res_w_tablet - (res_w_desktop/proportion))/2
offset_y = (res_h_tablet - (res_h_desktop/proportion))/2
-- the overscan configuration options of the Raspberry Pi (also, since you report also deal with asymmetry).
EDIT:
in fact, your get_mouse_and_factors() returns a "factor_x" and a "factor_y" (
return (mouse, host_x / (device_x * 1.0), host_y / (device_y * 1.0)) ) but there is actually a single proportion, since the Monitor software does not stretch.