1
0
Fork 0
forked from len0rd/rockbox

touchscreen/skin_engine: The touchregion handler didn't handle that vertical bars are bottom-up by default

Change-Id: I4e7fc451c7ba318acb110c587bff4306c393e09f
This commit is contained in:
Thomas Martitz 2014-01-12 11:02:02 +01:00
parent 0a0d61e777
commit c0a02c98c1

View file

@ -111,8 +111,8 @@ int skin_get_touchaction(struct wps_data *data, int* edge_offset,
SKINOFFSETTOPTR(skin_buffer, r->bar);
if(r->width > r->height)
*edge_offset = vx*100/r->width;
else
*edge_offset = vy*100/r->height;
else /* vertical bars are bottom-up by default */
*edge_offset = 100 - vy*100/r->height;
if (r->reverse_bar || (bar && bar->invert_fill_direction))
*edge_offset = 100 - *edge_offset;
}