From a027f851efb6f152594af57d465484ee697ae0fb Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 1 Jul 2024 10:17:37 +0200 Subject: [PATCH] fixed bug causing BD engine hanging in wrap-around scrolling edge case --- src/game_bd/bd_graphics.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/game_bd/bd_graphics.c b/src/game_bd/bd_graphics.c index c509ec57..793987e2 100644 --- a/src/game_bd/bd_graphics.c +++ b/src/game_bd/bd_graphics.c @@ -334,6 +334,11 @@ boolean gd_scroll(GdGame *game, boolean exact_scroll, boolean immediate) scroll_speed_last = -1; // check if active player is visible at the moment. + // but only if scrolling happened at all! + if (!changed) + return FALSE; + + // check if active player is outside drawing area. if yes, we should wait for scrolling. return player_out_of_window(game, player_x, player_y); } -- 2.34.1