<div dir="ltr">Oops.<br><div><br>Updated patch to remove an obvious error (I used the inverse of the ratio). Also changed to assume the device units are square and thus the resolution is the same in both directions, rather than guessing as to the shape of the device. And fixed some incorrect replacement of tab with spaces.<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 24, 2015 at 11:38 AM, Bill Spitzak <span dir="ltr"><<a href="mailto:spitzak@gmail.com" target="_blank">spitzak@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Searching for uses of fake_resolution and equating the two results gives scale factors between resolution and the controller range (called width and height here):<br></div><div><br>evdev-mt-touchpad-buttons.c:535 bottom_area.top_edge<br><br>        height * 0.15 / yres <= 10 (to choose the same branch as fake does now)<br>        yres * 10 >= height * 0.15<br>        yres >= height / 66.66<br><br>evdev-mt-touchpad-buttons.c:572 top_area.bottom_edge<br><br>        yoffset + topsize_mm * yres == height * topsize_pct + yoffset<br>        yres * topsize_mm == height * topsize_pct<br>        yres * 10 * topbutton_size_mult == height * .15 * topbutton_size_mult<br>        yres * 10 = height * .15<br>        yres = height / 66.66<br><br>evdev-mt-touchpad-buttons.c:743 motion_dist.scale_coeff<br><br>        diagonal * BUTTON_MOTION_MAGIC == 1/xres == 1/yres<br>        1/xres == 1/yres == diagonal * 0.007<br>        (This is inverted! Correct for assumed mistake:)<br>        xres == yres == diagonal * 0.007<br>        (assume touchpad is 4x3. Then width == diagonal * 4/5 and height == diagonal * 3/5)<br>        xres = width / 114.28<br>        yres = height / 85.71<br><br>evdev-mt-touchpad-buttons.c:836 clickfinger_distance<br><br>        width * 0.3 == xres * 40 (equate the two things x is compared with)<br>        xres = width * 0.3 / 40<br>        xres = width / 133.33<br><br>        height * 0.3 == yres * 20 (equate the two things y is compared with)<br>        yres = height * 0.3 / 20<br>        yres = height / 66.667<br><br>evdev-mt-touchpad.c:1285 accel.scale_coeff<br><br>        (DEFAULT_MOUSE_DPI/25.4) / xres == DEFAULT_ACCEL_NUMERATOR / diagonal (same for yres)<br>        (1000/25.4) / xres == 3000 / diagonal<br>        xres = yres = diagonal * (1000 / 25.4 / 3000)<br>        (assume same 4x3 aspect of touchpad as above)<br>        xres = width / 91.5<br>        yres = height / 68.625<br><br>evdev-mt-touchpad.c:1497 hysteresis_margin<br><br>        xres / 2 == diagonal / DEFAULT_HYSTERESIS_MARGIN_DENOMINAOTR (same for yres)<br>        xres / 2 = diagonal / 700<br>        xres = diagonal / 350<br>        (assume same 4x3 aspect of touchpad as above)<br>        xres = width / 280<br>        yres = height / 210<br>        (this seems to be an out-liner and probably should be ignored)<br><br>Most popular height divisor is 66.667. This makes sense as it is a 6.6cm tall touch pad.<br></div></div></blockquote><div> </div></div></div></div></div></div>