From: Holger Schemel Date: Tue, 15 Oct 2024 02:04:42 +0000 (+0200) Subject: minor code cleanup X-Git-Tag: 4.4.0.0-test-4~117 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=d8e0ff5c9ecc386502f8e2236f865c940ec6c247;p=rocksndiamonds.git minor code cleanup --- 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 {