[Scummvm-git-logs] scummvm master -> c0f33c73f03fe27b4ba9f81e326aa00570ff0435

sev- sev at scummvm.org
Sun Apr 18 08:08:34 UTC 2021


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:
c0f33c73f0 GUI: Fix scale sync for GraphicsWidget


Commit: c0f33c73f03fe27b4ba9f81e326aa00570ff0435
    https://github.com/scummvm/scummvm/commit/c0f33c73f03fe27b4ba9f81e326aa00570ff0435
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-04-18T10:07:40+02:00

Commit Message:
GUI: Fix scale sync for GraphicsWidget

Changed paths:
    gui/widget.cpp


diff --git a/gui/widget.cpp b/gui/widget.cpp
index 0ca365864d..78f22683d4 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -884,6 +884,9 @@ void GraphicsWidget::setGfx(const Graphics::ManagedSurface *gfx, bool scale) {
 	if (scale && sf != 1.0) {
 		_w = gfx->w * sf;
 		_h = gfx->h * sf;
+	} else {
+		_w = gfx->w;
+		_h = gfx->h;
 	}
 
 	if ((_w != gfx->w || _h != gfx->h) && _w && _h) {
@@ -916,7 +919,7 @@ void GraphicsWidget::setGfx(int w, int h, int r, int g, int b) {
 void GraphicsWidget::setGfxFromTheme(const char *name) {
 	const Graphics::ManagedSurface *gfx = g_gui.theme()->getImageSurface(name);
 
-	setGfx(gfx);
+	setGfx(gfx, false);
 }
 
 void GraphicsWidget::drawWidget() {




More information about the Scummvm-git-logs mailing list