Touchpad Issue Fix

Fixed interchanged cases of landscape and landscapeInv in tpReadX()
and tpReadY()
ugfx_release_2.6
Kumar Abhishek 2012-10-04 15:12:57 +05:30
parent a03b2fbf5d
commit c35988ffb5
1 changed files with 7 additions and 7 deletions

View File

@ -157,11 +157,11 @@ uint16_t tpReadX(void) {
case portrait:
return x;
case landscape:
return SCREEN_HEIGHT - y;
case portraitInv:
return SCREEN_WIDTH - x;
case landscapeInv:
return y;
case portraitInv:
return SCREEN_WIDTH - x - 1;
case landscapeInv:
return SCREEN_HEIGHT - y - 1;
}
return 0;
@ -184,11 +184,11 @@ uint16_t tpReadY(void) {
case portrait:
return y;
case landscape:
return x;
return SCREEN_WIDTH - x - 1;
case portraitInv:
return SCREEN_HEIGHT - y;
return SCREEN_HEIGHT - y - 1;
case landscapeInv:
return SCREEN_WIDTH - x;
return x;
}
return 0;