Commit 0ac1c3810824b43fb8439d72d116e379e01e5030
- Diff rendering mode:
- inline
- side by side
src/wcmCommon.c
(9 / 23)
|   | |||
| 726 | 726 | { | |
| 727 | 727 | tmp_coord = *x; | |
| 728 | 728 | *x = *y; | |
| 729 | if (!IsTouch(priv)) | ||
| 730 | *y = common->wcmMaxY - tmp_coord; | ||
| 731 | else | ||
| 732 | *y = common->wcmMaxTouchY - tmp_coord; | ||
| 729 | *y = priv->maxY - tmp_coord; | ||
| 733 | 730 | } | |
| 734 | 731 | else if (common->wcmRotate == ROTATE_CCW) | |
| 735 | 732 | { | |
| 736 | 733 | tmp_coord = *y; | |
| 737 | 734 | *y = *x; | |
| 738 | if (!IsTouch(priv)) | ||
| 739 | *x = common->wcmMaxX - tmp_coord; | ||
| 740 | else | ||
| 741 | *y = common->wcmMaxTouchX - tmp_coord; | ||
| 735 | *x = priv->maxX - tmp_coord; | ||
| 742 | 736 | } | |
| 743 | 737 | else if (common->wcmRotate == ROTATE_HALF) | |
| 744 | 738 | { | |
| 745 | if (!IsTouch(priv)) | ||
| 746 | { | ||
| 747 | *x = common->wcmMaxX - *x; | ||
| 748 | *y = common->wcmMaxY - *y; | ||
| 749 | } | ||
| 750 | else | ||
| 751 | { | ||
| 752 | *x = common->wcmMaxTouchX - *x; | ||
| 753 | *y = common->wcmMaxTouchY - *y; | ||
| 754 | } | ||
| 739 | *x = priv->maxX - *x; | ||
| 740 | *y = priv->maxY - *y; | ||
| 755 | 741 | } | |
| 756 | 742 | } | |
| 757 | 743 | ||
| … | … | ||
| 1939 | 1939 | /* rotate all devices at once! else they get misaligned */ | |
| 1940 | 1940 | for (tmppriv = common->wcmDevices; tmppriv; tmppriv = tmppriv->next) | |
| 1941 | 1941 | { | |
| 1942 | oldMaxX = priv->maxX; | ||
| 1943 | oldMaxY = priv->maxY; | ||
| 1942 | oldMaxX = tmppriv->maxX; | ||
| 1943 | oldMaxY = tmppriv->maxY; | ||
| 1944 | 1944 | ||
| 1945 | if (oldRotation == ROTATE_CW || oldRotation == ROTATE_CCW) | ||
| 1945 | if (oldRotation == ROTATE_CW || oldRotation == ROTATE_CCW) | ||
| 1946 | 1946 | { | |
| 1947 | priv->maxX = oldMaxY; | ||
| 1948 | priv->maxY = oldMaxX; | ||
| 1947 | tmppriv->maxX = oldMaxY; | ||
| 1948 | tmppriv->maxY = oldMaxX; | ||
| 1949 | 1949 | } | |
| 1950 | 1950 | ||
| 1951 | 1951 | tmpTopX = tmppriv->topX; |

