Synced with ScummVM rev: f6c5fed173

This commit is contained in:
Pawel Kolodziejski 2020-10-03 18:14:12 +02:00
parent 6120146fab
commit c12503a869
5 changed files with 20 additions and 7 deletions

View file

@ -124,6 +124,13 @@ void OpenGLGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
_cursor->enableLinearFiltering(enable);
}
// The overlay UI should also obey the filtering choice (managed via the Filter Graphics checkbox in Graphics Tab).
// Thus, when overlay filtering is disabled, scaling in OPENGL is done with GL_NEAREST (nearest neighbor scaling).
// It may look crude, but it should be crispier and it's left to user choice to enable filtering.
if (_overlay) {
_overlay->enableLinearFiltering(enable);
}
break;
case OSystem::kFeatureCursorPalette:
@ -958,10 +965,14 @@ void OpenGLGraphicsManager::handleResizeImpl(const int width, const int height,
_overlay = createSurface(_defaultFormatAlpha);
assert(_overlay);
// We always filter the overlay with GL_LINEAR. This assures it's
// readable in case it needs to be scaled and does not affect it
// otherwise.
_overlay->enableLinearFiltering(true);
// We should NOT always filter the overlay with GL_LINEAR.
// In previous versions we always did use GL_LINEAR to assure the UI
// would be readable in case it needed to be scaled -- it would not affect it otherwise.
// However in modern devices due to larger screen size the UI display looks blurry
// when using the linear filtering scaling, and we got bug report(s) for it.
// eg. https://bugs.scummvm.org/ticket/11742
// So, we now respect the choice for "Filter Graphics" made via ScummVM GUI (under Graphics Tab)
_overlay->enableLinearFiltering(_currentState.filtering);
}
_overlay->allocate(overlayWidth, overlayHeight);
_overlay->fill(0);