From 9aa2d43facd0a3fbafb1e7e432fca80f89aa6c66 Mon Sep 17 00:00:00 2001 From: Einar Johan T. Sømåen Date: Thu, 7 Jun 2012 13:40:57 +0200 Subject: WINTERMUTE: Fix BRenderSDL::Fill --- engines/wintermute/Base/BRenderSDL.cpp | 3 ++- engines/wintermute/Base/BRenderSDL.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'engines/wintermute') diff --git a/engines/wintermute/Base/BRenderSDL.cpp b/engines/wintermute/Base/BRenderSDL.cpp index 5513dd5e69..3dca9e1f39 100644 --- a/engines/wintermute/Base/BRenderSDL.cpp +++ b/engines/wintermute/Base/BRenderSDL.cpp @@ -238,8 +238,9 @@ HRESULT CBRenderSDL::Fill(byte r, byte g, byte b, Common::Rect *rect) { rect->setHeight(_renderSurface->h); _renderSurface->fillRect(*rect, color); delete rect; + } else { + _renderSurface->fillRect(*rect, color); } - _renderSurface->fillRect(*rect, color); return S_OK; } diff --git a/engines/wintermute/Base/BRenderSDL.h b/engines/wintermute/Base/BRenderSDL.h index ab343578f4..ccdca89be5 100644 --- a/engines/wintermute/Base/BRenderSDL.h +++ b/engines/wintermute/Base/BRenderSDL.h @@ -47,7 +47,7 @@ public: HRESULT InitRenderer(int width, int height, bool windowed); HRESULT Flip(); - HRESULT Fill(byte r, byte g, byte b, Common::Rect *rect); + HRESULT Fill(byte r, byte g, byte b, Common::Rect *rect = NULL); HRESULT Fade(uint16 Alpha); HRESULT FadeToColor(uint32 Color, Common::Rect *rect = NULL); -- cgit v1.2.3