aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTectu <joel@unormal.org>2012-08-22 16:33:40 +0200
committerTectu <joel@unormal.org>2012-08-22 16:33:40 +0200
commitbee96e39ad908f1bcee57320c9764dd2ec63bead (patch)
treebf39d15c1affc3f28682b720e1c8e2bc79a61b06
parent217f15b4d34c19c87a2c188240f26ae1d50ee659 (diff)
downloaduGFX-bee96e39ad908f1bcee57320c9764dd2ec63bead.tar.gz
uGFX-bee96e39ad908f1bcee57320c9764dd2ec63bead.tar.bz2
uGFX-bee96e39ad908f1bcee57320c9764dd2ec63bead.zip
fixed touchpad orientation
-rw-r--r--src/touchpad.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/touchpad.c b/src/touchpad.c
index a18930da..44d5f426 100644
--- a/src/touchpad.c
+++ b/src/touchpad.c
@@ -158,8 +158,7 @@ uint16_t tpReadX(void) {
x = cal.xm * _tpReadRealX() + cal.xn;
y = cal.ym * _tpReadRealY() + cal.yn;
- /*
- switch(gdispGetOrientation()) { // implement gdispGetOrientation()
+ switch(gdispGetOrientation()) {
case portrait:
return x;
case landscape:
@@ -169,9 +168,6 @@ uint16_t tpReadX(void) {
case landscapeInv:
return y;
}
- */
-
- return x;
}
/**
@@ -187,8 +183,7 @@ uint16_t tpReadY(void) {
x = cal.xm * _tpReadRealX() + cal.xn;
y = cal.ym * _tpReadRealY() + cal.yn;
- /*
- switch(gdispGetOrientation()) { // implement gdispGetOrientation()
+ switch(gdispGetOrientation()) {
case portrait:
return y;
case landscape:
@@ -198,9 +193,6 @@ uint16_t tpReadY(void) {
case landscapeInv:
return SCREEN_WIDTH - x;
}
- */
-
- return y;
}
void tpCalibrate(void) {