Skip to content

Commit

Permalink
Update arm_2d_helper_font.c
Browse files Browse the repository at this point in the history
  • Loading branch information
GorgonMeducer committed Dec 24, 2024
1 parent 200538c commit b513db4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Helper/Source/arm_2d_helper_font.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ void arm_lcd_putchar(const char *str)
tCharDrawRegion.tLocation.iX -= tCharSize.iWidth >> 1;
tCharDrawRegion.tLocation.iY -= tCharSize.iHeight >> 1;

if (!arm_2d_helper_pfb_is_region_active(s_tLCDTextControl.ptTargetFB, &tCharDrawRegion, false)) {
if (!arm_2d_helper_pfb_is_region_active(s_tLCDTextControl.ptTargetFB, &tCharDrawRegion, true)) {
return ;
}
} while(0);
Expand Down Expand Up @@ -980,12 +980,13 @@ void arm_lcd_puts(const char *str)

do {
arm_2d_region_t tCharDrawRegion = s_tLCDTextControl.tRegion;

tCharDrawRegion.tSize.iWidth += tCharSize.iWidth;
tCharDrawRegion.tSize.iHeight += tCharSize.iHeight;
tCharDrawRegion.tLocation.iX -= tCharSize.iWidth >> 1;
tCharDrawRegion.tLocation.iY -= tCharSize.iHeight >> 1;

if (!arm_2d_helper_pfb_is_region_active(s_tLCDTextControl.ptTargetFB, &tCharDrawRegion, false)) {
if (!arm_2d_helper_pfb_is_region_active(s_tLCDTextControl.ptTargetFB, &tCharDrawRegion, true)) {
return ;
}
} while(0);
Expand Down

0 comments on commit b513db4

Please sign in to comment.