From 3dae37501c82ee678bd42205027938d3687bccd0 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sat, 20 Feb 2021 06:56:14 +0100 Subject: [PATCH] Fix partial screen updating --- Source/diablo.cpp | 1 + Source/scrollrt.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 8a58903c0..eac2a5272 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -338,6 +338,7 @@ static void run_game_loop(unsigned int uMsg) break; if (!nthread_has_500ms_passed()) { ProcessInput(); + force_redraw |= 1; DrawAndBlit(); continue; } diff --git a/Source/scrollrt.cpp b/Source/scrollrt.cpp index e7173aebe..6f7cd333a 100644 --- a/Source/scrollrt.cpp +++ b/Source/scrollrt.cpp @@ -1545,7 +1545,7 @@ void DrawAndBlit() return; } - if (SCREEN_WIDTH > PANEL_WIDTH || SCREEN_HEIGHT > VIEWPORT_HEIGHT + PANEL_HEIGHT || force_redraw == 255) { + if (SCREEN_WIDTH > PANEL_WIDTH || force_redraw == 255) { drawhpflag = TRUE; drawmanaflag = TRUE; drawbtnflag = TRUE; @@ -1553,7 +1553,7 @@ void DrawAndBlit() ddsdesc = FALSE; ctrlPan = TRUE; hgt = SCREEN_HEIGHT; - } else { + } else if (force_redraw == 1) { ddsdesc = TRUE; ctrlPan = FALSE; hgt = VIEWPORT_HEIGHT;