Fixed an issue where videos would still play if the video theme configuration was broken.

This commit is contained in:
Leon Styhre 2022-03-06 22:52:13 +01:00
parent 2df8a867ad
commit 9e2c24ef79
2 changed files with 3 additions and 2 deletions

View file

@ -81,6 +81,7 @@ void GamelistView::legacyPopulateFields()
mList.getPosition().y + mSize.y * 0.2125f);
mVideoComponents.back()->setSize(mSize.x * (0.5f - 2.0f * padding), mSize.y * 0.4f);
mVideoComponents.back()->setDefaultZIndex(30.0f);
mVideoComponents.back()->setVisible(false);
addChild(mVideoComponents.back().get());
}

View file

@ -122,7 +122,7 @@ void VideoFFmpegComponent::resize()
void VideoFFmpegComponent::render(const glm::mat4& parentTrans)
{
if (!isVisible() || mThemeOpacity == 0.0f)
if (!mVisible || mThemeOpacity == 0.0f)
return;
if (!mHasVideo && mStaticImagePath == "")
@ -1217,7 +1217,7 @@ bool VideoFFmpegComponent::decoderInitHW()
void VideoFFmpegComponent::startVideoStream()
{
if (mThemeOpacity == 0.0f)
if (!mVisible || mThemeOpacity == 0.0f)
return;
mIsPlaying = true;