[Scummvm-git-logs] scummvm master -> 35adc961be919d4717834c685bc910aa3ee1f67e
aquadran
noreply at scummvm.org
Sun Nov 21 11:40:32 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:
35adc961be Revert "OPENGL: Implement cursor scaling" (#3555)
Commit: 35adc961be919d4717834c685bc910aa3ee1f67e
https://github.com/scummvm/scummvm/commit/35adc961be919d4717834c685bc910aa3ee1f67e
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-11-21T12:40:28+01:00
Commit Message:
Revert "OPENGL: Implement cursor scaling" (#3555)
This reverts commit 2db20b702e05b16a9b8a6e0e0e0ea0799ea45459.
Changed paths:
backends/graphics/opengl/opengl-graphics.cpp
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index e1489852ea..beb2163954 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -763,8 +763,6 @@ void OpenGLGraphicsManager::setMouseCursor(const void *buf, uint w, uint h, int
_cursorDontScale = dontScale;
if (!w || !h) {
- if (_cursor)
- _cursor->unloadScaler();
delete _cursor;
_cursor = nullptr;
return;
@@ -783,17 +781,9 @@ void OpenGLGraphicsManager::setMouseCursor(const void *buf, uint w, uint h, int
// In case the color format has changed we will need to create the texture.
if (!_cursor || _cursor->getFormat() != inputFormat) {
- if (_cursor)
- _cursor->unloadScaler();
delete _cursor;
_cursor = nullptr;
-#ifdef USE_SCALERS
- bool wantScaler = (_currentState.scaleFactor > 1) && !dontScale
- && _scalerPlugins[_currentState.scalerIndex]->get<ScalerPluginObject>().canDrawCursor();
-#else
- bool wantScaler = false;
-#endif
GLenum glIntFormat, glFormat, glType;
Graphics::PixelFormat textureFormat;
@@ -808,14 +798,10 @@ void OpenGLGraphicsManager::setMouseCursor(const void *buf, uint w, uint h, int
} else {
textureFormat = _defaultFormatAlpha;
}
- _cursor = createSurface(textureFormat, false, wantScaler);
+ // TODO: Enable SW scaling for cursors
+ _cursor = createSurface(textureFormat, true);
assert(_cursor);
_cursor->enableLinearFiltering(_currentState.filtering);
-#ifdef USE_SCALERS
- if (wantScaler) {
- _cursor->setScaler(_currentState.scalerIndex, _currentState.scaleFactor);
- }
-#endif
}
_cursor->allocate(w, h);
More information about the Scummvm-git-logs
mailing list