diff Discovery/Src/gfx_engine.c @ 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 60162a939c06
children 2c2b9c6eb089
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;