diff options
| -rw-r--r-- | engines/sword25/gfx/opengl/openglgfx.cpp | 23 | 
1 files changed, 13 insertions, 10 deletions
diff --git a/engines/sword25/gfx/opengl/openglgfx.cpp b/engines/sword25/gfx/opengl/openglgfx.cpp index bc2e228030..bc3f87e556 100644 --- a/engines/sword25/gfx/opengl/openglgfx.cpp +++ b/engines/sword25/gfx/opengl/openglgfx.cpp @@ -212,18 +212,21 @@ bool OpenGLGfx::GetVsync() const {  // ----------------------------------------------------------------------------- -bool OpenGLGfx::Fill(const Common::Rect *FillRectPtr, unsigned int Color) { -	Common::Rect Rect; - -	if (!FillRectPtr) { -		Rect.left = 0; -		Rect.top = 0; -		Rect.right = m_Width; -		Rect.bottom = m_Height; -		FillRectPtr = &Rect; +bool OpenGLGfx::Fill(const Common::Rect *fillRectPtr, unsigned int color) { +	Common::Rect rect; + +	if (!fillRectPtr) { +		rect.left = 0; +		rect.top = 0; +		rect.right = m_Width - 1; +		rect.bottom = m_Height - 1; +		fillRectPtr = ▭  	} -	warning("STUB: Fill()"); +	if (fillRectPtr->width() > 0 && fillRectPtr->height() > 0) { +		_backSurface.fillRect(*fillRectPtr, color); +		g_system->copyRectToScreen((byte *)_backSurface.getBasePtr(fillRectPtr->left, fillRectPtr->top), _backSurface.pitch, fillRectPtr->left, fillRectPtr->top, fillRectPtr->width(), fillRectPtr->height()); +	}  	return true;  }  | 
