Mercurial > public > ostc4
diff Discovery/Src/gfx_engine.c @ 622:8f78faf88fc5
Adjustments for flipped display view:
After some testing the t3_profile implementation in flipped mode some changes in the visualization were necessary to get a correct view.
author | Ideenmodellierer |
---|---|
date | Wed, 03 Feb 2021 21:45:48 +0100 |
parents | 82d58470fd94 |
children | ba83a8ef9bad |
line wrap: on
line diff
--- a/Discovery/Src/gfx_engine.c Wed Feb 03 21:44:22 2021 +0100 +++ b/Discovery/Src/gfx_engine.c Wed Feb 03 21:45:48 2021 +0100 @@ -836,8 +836,8 @@ pDestination = (uint16_t*)hgfx->FBStartAdress; if(pSettings->FlipDisplay) { - pDestination += (800 - start.x) * hgfx->ImageHeight; - pDestination += (480 - start.y); + pDestination += (799 - start.x) * hgfx->ImageHeight; + pDestination += (479 - start.y); stepdir = -1; } else @@ -860,8 +860,8 @@ if(pSettings->FlipDisplay) { - pDestination += (800 - start.x) * hgfx->ImageHeight; - pDestination += (480 - start.y); + pDestination += (799 - start.x) * hgfx->ImageHeight; + pDestination += (479 - start.y); stepdir = -1; } else @@ -893,7 +893,7 @@ if(pSettings->FlipDisplay) { - pDestination += (((800 - x0) * hgfx->ImageHeight) + (480 - y0)); + pDestination += (((799 - x0) * hgfx->ImageHeight) + (479 - y0)); } else { @@ -1591,8 +1591,8 @@ } else { - pStart += (800 - LeftLow.x - 1) * hgfx->ImageHeight; - pStart += (480 - LeftLow.y); + pStart += (799 - LeftLow.x) * hgfx->ImageHeight; + pStart += (479 - LeftLow.y); stepdir = -1; }