Fixed an issue where the screensaver overlay did not render correctly when rotating the screen.

This commit is contained in:
Leon Styhre 2023-02-07 18:10:24 +01:00
parent 45e1a79f9e
commit 1e31423f3f

View file

@ -284,14 +284,11 @@ void Screensaver::renderScreensaver()
if (static_cast<int>(mState) >= STATE_FADE_IN_VIDEO) { if (static_cast<int>(mState) >= STATE_FADE_IN_VIDEO) {
if (mImageScreensaver->hasImage()) { if (mImageScreensaver->hasImage()) {
mImageScreensaver->setOpacity(1.0f - mOpacity); mImageScreensaver->setOpacity(1.0f - mOpacity);
glm::mat4 trans {Renderer::getIdentity()};
mImageScreensaver->render(trans); mImageScreensaver->render(trans);
} }
} }
} }
mRenderer->setMatrix(trans);
if (isScreensaverActive()) { if (isScreensaverActive()) {
if (mScreensaverType == "slideshow") { if (mScreensaverType == "slideshow") {
if (mHasMediaFiles) { if (mHasMediaFiles) {
@ -299,6 +296,7 @@ void Screensaver::renderScreensaver()
mRenderer->shaderPostprocessing(Renderer::Shader::SCANLINES); mRenderer->shaderPostprocessing(Renderer::Shader::SCANLINES);
if (Settings::getInstance()->getBool("ScreensaverSlideshowGameInfo") && if (Settings::getInstance()->getBool("ScreensaverSlideshowGameInfo") &&
mGameOverlay) { mGameOverlay) {
mRenderer->setMatrix(mRenderer->getIdentity());
if (mGameOverlayRectangleCoords.size() == 4) { if (mGameOverlayRectangleCoords.size() == 4) {
mRenderer->drawRect( mRenderer->drawRect(
mGameOverlayRectangleCoords[0], mGameOverlayRectangleCoords[1], mGameOverlayRectangleCoords[0], mGameOverlayRectangleCoords[1],
@ -350,6 +348,7 @@ void Screensaver::renderScreensaver()
mRenderer->shaderPostprocessing(shaders, videoParameters); mRenderer->shaderPostprocessing(shaders, videoParameters);
if (Settings::getInstance()->getBool("ScreensaverVideoGameInfo") && mGameOverlay) { if (Settings::getInstance()->getBool("ScreensaverVideoGameInfo") && mGameOverlay) {
mRenderer->setMatrix(mRenderer->getIdentity());
if (mGameOverlayRectangleCoords.size() == 4) { if (mGameOverlayRectangleCoords.size() == 4) {
mRenderer->drawRect( mRenderer->drawRect(
mGameOverlayRectangleCoords[0], mGameOverlayRectangleCoords[1], mGameOverlayRectangleCoords[0], mGameOverlayRectangleCoords[1],