mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 13:13:58 +00:00
GUI: Fix regression in PictureWidget which led to double scaling
This commit is contained in:
parent
91832bf9d8
commit
9bcffc97ee
@ -881,8 +881,13 @@ void GraphicsWidget::setGfx(const Graphics::ManagedSurface *gfx, bool scale) {
|
||||
}
|
||||
|
||||
float sf = g_gui.getScaleFactor();
|
||||
if ((scale && sf != 1.0) || ((_w != gfx->w || _h != gfx->h) && _w && _h)) {
|
||||
Graphics::Surface *tmp2 = gfx->rawSurface().scale(gfx->w * sf, gfx->h * sf, false);
|
||||
if (scale && sf != 1.0) {
|
||||
_w = gfx->w * sf;
|
||||
_h = gfx->h * sf;
|
||||
}
|
||||
|
||||
if ((_w != gfx->w || _h != gfx->h) && _w && _h) {
|
||||
Graphics::Surface *tmp2 = gfx->rawSurface().scale(_w, _h, false);
|
||||
_gfx.copyFrom(*tmp2);
|
||||
tmp2->free();
|
||||
delete tmp2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user