mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 22:28:10 +00:00
GUI: If GraphicsWidget is hidden do not proceed with GraphicsWidget::setGfx()
Removes interfering invisible thumbnail with list item selection in saveload-dialog (OpenGL, large scale) I'm issuing this as a PR because I'm unsure if this fix is ok, since it affects all GraphicsWidget objects, not just the one for thumbnail in saveload-dialog. Also not sure if some similar check should be done in the other setGfx() methods in widget.cpp to prevent similar issues. Note that an alternative fix, which also works, would be to only modify gui/saveload-dialog.cpp and method SaveLoadChooserSimple::updateSelection(), to check for _gfxWidget isVisible status before calling: _gfxWidget->setGfx(thumb, true);
This commit is contained in:
parent
89ae8da5de
commit
6fb05fceeb
@ -880,6 +880,9 @@ void GraphicsWidget::setGfx(const Graphics::ManagedSurface *gfx, bool scale) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isVisible())
|
||||
return;
|
||||
|
||||
float sf = g_gui.getScaleFactor();
|
||||
if (scale && sf != 1.0) {
|
||||
_w = gfx->w * sf;
|
||||
|
Loading…
Reference in New Issue
Block a user