Browse Source

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.
pull/4518/head
Gleb Mazovetskiy 4 years ago
parent
commit
52e0511479
  1. 13
      Source/DiabloUI/diabloui.h

13
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();

Loading…
Cancel
Save