changeset 681:7fa5ef6ae419 Betatest

Bugfix screen clipping (Flipdisplay mode): part of characters may be truncated in case they do not fit on the screen. The truncation was not working for flip mode causing some black areas e.g. in the simulator menu. The code does now consider the inversed boundaries of the screen in case flip mode is active.
author Ideenmodellierer
date Mon, 25 Apr 2022 21:10:10 +0200
parents 5575f21382d5
children 8775d3dc6325
files Discovery/Src/gfx_engine.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Discovery/Src/gfx_engine.c	Mon Apr 25 21:07:28 2022 +0200
+++ b/Discovery/Src/gfx_engine.c	Mon Apr 25 21:10:10 2022 +0200
@@ -2754,7 +2754,14 @@
 	}
 // -----------------------------
 	char_truncated_Height = 0;
-	height_left = hgfx->Image->ImageHeight - (hgfx->WindowY0 + cfg->Ydelta);
+	if(!pSettings->FlipDisplay)
+	{
+		height_left = hgfx->Image->ImageHeight - (hgfx->WindowY0 + cfg->Ydelta);
+	}
+	else
+	{
+		height_left = (hgfx->WindowY1 - cfg->Ydelta);
+	}
 	if(height_left < height)
 	{
 		char_truncated_Height = height - height_left;