From d8e0ff5c9ecc386502f8e2236f865c940ec6c247 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Tue, 15 Oct 2024 04:04:42 +0200 Subject: [PATCH] minor code cleanup --- src/screens.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/screens.c b/src/screens.c index c57c7732..1896122b 100644 --- a/src/screens.c +++ b/src/screens.c @@ -4317,15 +4317,12 @@ void HandleInfoScreen_Generic(int mx, int my, int dx, int dy, int button) FadeIn(REDRAW_FIELD); } } - else if (dy) + else if ((dy < 0 && wrapped_text->line_visible_first > 0) || + (dy > 0 && wrapped_text->line_visible_last < wrapped_text->num_lines - 1)) { - if ((dy < 0 && wrapped_text->line_visible_first > 0) || - (dy > 0 && wrapped_text->line_visible_last < wrapped_text->num_lines - 1)) - { - start_pos += SIGN(dy); + start_pos += SIGN(dy); - DrawInfoScreen_GenericText(wrapped_text, wrapped_tmi, start_pos); - } + DrawInfoScreen_GenericText(wrapped_text, wrapped_tmi, start_pos); } else { -- 2.34.1