[Scummvm-git-logs] scummvm master -> 1489f2ed0ff9089f15c5dc3809f8e7e3422c9641

rsn8887 rsn8887 at users.noreply.github.com
Thu Jan 23 21:06:43 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
1489f2ed0f OPENGL: Fix GUI centering when using Fit to window (4:3) mode


Commit: 1489f2ed0ff9089f15c5dc3809f8e7e3422c9641
    https://github.com/scummvm/scummvm/commit/1489f2ed0ff9089f15c5dc3809f8e7e3422c9641
Author: rsn8887 (rsn8887 at users.noreply.github.com)
Date: 2020-01-23T15:06:08-06:00

Commit Message:
OPENGL: Fix GUI centering when using Fit to window (4:3) mode

Changed paths:
    backends/graphics/opengl/opengl-graphics.cpp


diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index ff8a200..1bf0b36 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -510,8 +510,10 @@ void OpenGLGraphicsManager::updateScreen() {
 
 	// Second step: Draw the overlay if visible.
 	if (_overlayVisible) {
+		int dstX = (_windowWidth - _overlayDrawRect.width()) / 2;
+		int dstY = (_windowHeight - _overlayDrawRect.height()) / 2;
 		_backBuffer.enableBlend(Framebuffer::kBlendModeTraditionalTransparency);
-		g_context.getActivePipeline()->drawTexture(_overlay->getGLTexture(), 0, 0, _overlayDrawRect.width(), _overlayDrawRect.height());
+		g_context.getActivePipeline()->drawTexture(_overlay->getGLTexture(), dstX, dstY, _overlayDrawRect.width(), _overlayDrawRect.height());
 	}
 
 	// Third step: Draw the cursor if visible.




More information about the Scummvm-git-logs mailing list