View Single Post
Old 03-11-2018, 04:32 AM   #19
mdp
Wizard
mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.
 
Posts: 1,481
Karma: 9010563
Join Date: Jul 2013
Device: none
Quote:
Originally Posted by sogaiu View Post
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.

Last edited by mdp; 03-11-2018 at 04:39 AM.
mdp is offline   Reply With Quote