- fixed incorrect check for SW texture recreation.

This commit is contained in:
Christoph Oelckers 2018-04-07 18:41:25 +02:00
parent 5fbc723842
commit cd00f1fb45

View file

@ -104,7 +104,7 @@ SWSceneDrawer::~SWSceneDrawer()
void SWSceneDrawer::RenderView(player_t *player)
{
DCanvas buffer(screen->GetWidth(), screen->GetHeight(), swtruecolor);
if (FBTexture == nullptr || FBTexture->hwtex == nullptr || FBTexture->GetWidth() != screen->GetWidth() || FBTexture->GetHeight() != screen->GetHeight() || (swtruecolor?4:1) != FBTexture->WidthBits)
if (FBTexture == nullptr || FBTexture->hwtex == nullptr || FBTexture->GetWidth() != screen->GetWidth() || FBTexture->GetHeight() != screen->GetHeight() || (swtruecolor? 1:0) != FBTexture->WidthBits)
{
// This manually constructs its own material here.
if (FBTexture != nullptr) delete FBTexture;