[Scummvm-git-logs] scummvm master -> 1859cf455dc7a8469b5178d2f619070cff4c2f02
lephilousophe
noreply at scummvm.org
Sat Oct 29 16:08:53 UTC 2022
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:
1859cf455d OPENGL: Use texture size of cursor instead of computing it
Commit: 1859cf455dc7a8469b5178d2f619070cff4c2f02
https://github.com/scummvm/scummvm/commit/1859cf455dc7a8469b5178d2f619070cff4c2f02
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2022-10-29T18:08:39+02:00
Commit Message:
OPENGL: Use texture size of cursor instead of computing it
Computation was not correct and resulted in corrupted cursor
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 6efe0a43013..40383a9cac6 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -673,11 +673,12 @@ void OpenGLGraphicsManager::updateScreen() {
gameScreenCursorX = gameScreenCursorX * retroWidth / _gameDrawRect.width();
gameScreenCursorY = gameScreenCursorY * retroHeight / _gameDrawRect.height();
- int cursorWidth = _cursorWidthScaled * retroWidth / _gameDrawRect.width();
- int cursorHeight = _cursorHeightScaled * retroHeight / _gameDrawRect.height();
+ const GLTexture &cursorTexture = _cursor->getGLTexture();
+ const uint cursorWidth = cursorTexture.getLogicalWidth(),
+ cursorHeight = cursorTexture.getLogicalHeight();
_gameScreenTarget->enableBlend(Framebuffer::kBlendModePremultipliedTransparency);
- Pipeline::getActivePipeline()->drawTexture(_cursor->getGLTexture(), gameScreenCursorX, gameScreenCursorY, cursorWidth, cursorHeight);
+ Pipeline::getActivePipeline()->drawTexture(cursorTexture, gameScreenCursorX, gameScreenCursorY, cursorWidth, cursorHeight);
needsCursor = false;
}
Pipeline::getActivePipeline()->setFramebuffer(lastFramebuffer);
More information about the Scummvm-git-logs
mailing list