From c12503a86947721c7aa33d3cc4de6e9419e11d68 Mon Sep 17 00:00:00 2001 From: Pawel Kolodziejski Date: Sat, 3 Oct 2020 18:14:12 +0200 Subject: [PATCH] Synced with ScummVM rev: f6c5fed1739ddadc59b919407859bec7ee403c35 --- backends/graphics/opengl/opengl-graphics.cpp | 19 +++++++++++++++---- backends/keymapper/remap-widget.cpp | 2 +- configure | 3 +++ gui/ThemeEngine.cpp | 2 +- gui/options.cpp | 1 - 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index 34836ce5b74..9f562e24e80 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -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); diff --git a/backends/keymapper/remap-widget.cpp b/backends/keymapper/remap-widget.cpp index a73b1fcfb6e..fcc5ee3e253 100644 --- a/backends/keymapper/remap-widget.cpp +++ b/backends/keymapper/remap-widget.cpp @@ -218,7 +218,7 @@ void RemapWidget::startRemapping(uint actionIndex) { _remapAction = _actions[actionIndex].action; uint32 remapTimeoutDelay = kRemapMinTimeoutDelay; - if (ConfMan.hasKey("remap_timeout_delay_ms") && (ConfMan.getInt("remap_timeout_delay_ms") > kRemapMinTimeoutDelay)) { + if (ConfMan.hasKey("remap_timeout_delay_ms") && ((uint32)ConfMan.getInt("remap_timeout_delay_ms") > kRemapMinTimeoutDelay)) { remapTimeoutDelay = (uint32)ConfMan.getInt("remap_timeout_delay_ms"); } _remapTimeout = g_system->getMillis() + remapTimeoutDelay; diff --git a/configure b/configure index 3c1afd840f7..fe08b691675 100755 --- a/configure +++ b/configure @@ -2215,6 +2215,9 @@ echo $_use_cxx11 # # Determine extra build flags for debug and/or release builds # +if test "$_debug_build" = auto && test "$_release_build" = yes; then + _debug_build=no +fi if test "$_debug_build" != no; then # debug mode not explicitly disabled -> compile with debug information echo_n "Checking best debug mode... " diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 27b391071af..c4d5789cb8f 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -529,7 +529,7 @@ bool ThemeEngine::addFont(TextData textId, const Common::String &language, const if (textId == -1) return false; - if (!language.empty() && !language.equals("*")) { + if (!language.empty()) { #ifdef USE_TRANSLATION Common::String cl = TransMan.getCurrentLanguage(); if (!cl.matchString(language, true)) diff --git a/gui/options.cpp b/gui/options.cpp index 9072b6ac684..fe44ff0dcd3 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -2401,7 +2401,6 @@ void GlobalOptionsDialog::apply() { ConfMan.set("gui_language", newLang); newCharset = TransMan.getCurrentCharset(); isRebuildNeeded = true; - g_gui.setLanguageRTL(); } bool guiUseGameLanguage = _guiLanguageUseGameLanguageCheckbox->getState();