comparison 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
comparison
equal deleted inserted replaced
680:5575f21382d5 681:7fa5ef6ae419
2752 char_truncated_WidthFlag = 1; 2752 char_truncated_WidthFlag = 1;
2753 width = width_left; 2753 width = width_left;
2754 } 2754 }
2755 // ----------------------------- 2755 // -----------------------------
2756 char_truncated_Height = 0; 2756 char_truncated_Height = 0;
2757 height_left = hgfx->Image->ImageHeight - (hgfx->WindowY0 + cfg->Ydelta); 2757 if(!pSettings->FlipDisplay)
2758 {
2759 height_left = hgfx->Image->ImageHeight - (hgfx->WindowY0 + cfg->Ydelta);
2760 }
2761 else
2762 {
2763 height_left = (hgfx->WindowY1 - cfg->Ydelta);
2764 }
2758 if(height_left < height) 2765 if(height_left < height)
2759 { 2766 {
2760 char_truncated_Height = height - height_left; 2767 char_truncated_Height = height - height_left;
2761 if((char_truncated_Height & 1) != 0) 2768 if((char_truncated_Height & 1) != 0)
2762 { 2769 {