From 11d299114fcabb721cb995228797ae069bcf8155 Mon Sep 17 00:00:00 2001 From: mobyfab Date: Fri, 7 Sep 2012 22:57:35 +0200 Subject: Fixes for the touchpad API. --- src/touchpad.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/touchpad.c b/src/touchpad.c index 44d5f426..5e81738b 100644 --- a/src/touchpad.c +++ b/src/touchpad.c @@ -196,11 +196,12 @@ uint16_t tpReadY(void) { } void tpCalibrate(void) { - uint16_t cross[2][2] = {{40,50}, {200, 280}}; + const uint16_t h = gdispGetHeight(); + const uint16_t w = gdispGetWidth(); + const uint16_t cross[2][2] = {{(w/8), (h/8)}, {(w-(w/8)) , (h-(h/8))}}; uint16_t points[2][2]; uint8_t i; - //gdispSetOrientation(portrait); gdispClear(Red); gdispFillStringBox(0, 10, gdispGetWidth(), 30, "Calibration", &fontUI2Double, White, Red, justifyCenter); -- cgit v1.2.3