Coordinates might be negative, so we need a separate boolean rather
than using -1 as a sentinel.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
+ int try_zone;
+ int pos;
if (cfg->button_zones && earliest >= 0) {
pos = ms->touch[earliest].x;
if (cfg->button_zones && earliest >= 0) {
pos = ms->touch[earliest].x;
}
if (cfg->bottom_edge_zones) {
int latest_bottom = -1;
}
if (cfg->bottom_edge_zones) {
int latest_bottom = -1;
if (latest_bottom == -1 || timercmp(&ms->touch[i].down, &ms->touch[latest_bottom].down, >))
latest_bottom = i;
}
if (latest_bottom == -1 || timercmp(&ms->touch[i].down, &ms->touch[latest_bottom].down, >))
latest_bottom = i;
}
- if (latest_bottom >= 0)
+ if (latest_bottom >= 0) {
pos = ms->touch[latest_bottom].x;
pos = ms->touch[latest_bottom].x;
int zones, left, right;
double width;
int zones, left, right;
double width;