From 8ded5fc9b606ecb279e7ae4c2d5de1eb47f54891 Mon Sep 17 00:00:00 2001 From: Federico Amedeo Izzo Date: Fri, 29 Jan 2021 22:03:13 +0100 Subject: [PATCH] Graphics: Fix print with TEXT_ALIGN_RIGHT not working --- openrtx/src/graphics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openrtx/src/graphics.c b/openrtx/src/graphics.c index 560a16c3..e0731920 100644 --- a/openrtx/src/graphics.c +++ b/openrtx/src/graphics.c @@ -275,7 +275,7 @@ static inline uint16_t get_reset_x(textAlign_t alignment, case TEXT_ALIGN_CENTER: return (SCREEN_WIDTH - line_size)/2; case TEXT_ALIGN_RIGHT: - return startx - line_size; + return SCREEN_WIDTH - line_size - startx; } return 0; }