mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 22:28:10 +00:00
OPENGL: Restore cursor scaling
This commit is contained in:
parent
8fb4a662fa
commit
3bd4e8c6a4
@ -786,6 +786,13 @@ void OpenGLGraphicsManager::setMouseCursor(const void *buf, uint w, uint h, int
|
||||
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;
|
||||
@ -800,10 +807,14 @@ void OpenGLGraphicsManager::setMouseCursor(const void *buf, uint w, uint h, int
|
||||
} else {
|
||||
textureFormat = _defaultFormatAlpha;
|
||||
}
|
||||
// TODO: Enable SW scaling for cursors
|
||||
_cursor = createSurface(textureFormat, true);
|
||||
_cursor = createSurface(textureFormat, true, wantScaler);
|
||||
assert(_cursor);
|
||||
_cursor->enableLinearFiltering(_currentState.filtering);
|
||||
#ifdef USE_SCALERS
|
||||
if (wantScaler) {
|
||||
_cursor->setScaler(_currentState.scalerIndex, _currentState.scaleFactor);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
_cursor->allocate(w, h);
|
||||
|
Loading…
Reference in New Issue
Block a user