From 52e05114794e401b8a9979c97c74b56ba2f9af2c Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Thu, 24 Mar 2022 20:57:49 +0000 Subject: [PATCH] DiabloUI: Always blit to `PalSurface` Previously we were blitting to the output surface directly. Blitting to `PalSurface` allows us to support CEL/CL2 rendering in the main menu. --- Source/DiabloUI/diabloui.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/Source/DiabloUI/diabloui.h b/Source/DiabloUI/diabloui.h index 0b6a80ed0..96a490b5f 100644 --- a/Source/DiabloUI/diabloui.h +++ b/Source/DiabloUI/diabloui.h @@ -78,18 +78,7 @@ extern bool (*gfnHeroInfo)(bool (*fninfofunc)(_uiheroinfo *)); inline SDL_Surface *DiabloUiSurface() { - auto *output_surface = GetOutputSurface(); - -#ifdef USE_SDL1 - // When using a non double-buffered hardware surface, render the UI - // to an off-screen surface first to avoid flickering / tearing. - if ((output_surface->flags & SDL_HWSURFACE) != 0 - && (output_surface->flags & SDL_DOUBLEBUF) == 0) { - return PalSurface; - } -#endif - - return output_surface; + return PalSurface; } void UiDestroy();