mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
fix show snapshot on video delay
This commit is contained in:
parent
6e7f5d1609
commit
2c217ec4c1
|
@ -164,19 +164,18 @@ void VideoComponent::render(const Eigen::Affine3f& parentTrans)
|
|||
|
||||
// Handle looping of the video
|
||||
handleLooping();
|
||||
}
|
||||
|
||||
if (!mIsPlaying)
|
||||
void VideoComponent::renderSnapshot(const Eigen::Affine3f& parentTrans)
|
||||
{
|
||||
// This is the case where the video is not currently being displayed. Work out
|
||||
// if we need to display a static image
|
||||
if ((mConfig.showSnapshotNoVideo && mVideoPath.empty()) || (mStartDelayed && mConfig.showSnapshotDelay))
|
||||
{
|
||||
// This is the case where the video is not currently being displayed. Work out
|
||||
// if we need to display a static image
|
||||
if ((mConfig.showSnapshotNoVideo && mVideoPath.empty()) || (mStartDelayed && mConfig.showSnapshotDelay))
|
||||
{
|
||||
// Display the static image instead
|
||||
mStaticImage.setOpacity((unsigned char)(mFadeIn * 255.0f));
|
||||
mStaticImage.render(parentTrans);
|
||||
}
|
||||
// Display the static image instead
|
||||
mStaticImage.setOpacity((unsigned char)(mFadeIn * 255.0f));
|
||||
mStaticImage.render(parentTrans);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void VideoComponent::applyTheme(const std::shared_ptr<ThemeData>& theme, const std::string& view, const std::string& element, unsigned int properties)
|
||||
|
|
|
@ -56,6 +56,7 @@ public:
|
|||
void setOpacity(unsigned char opacity) override;
|
||||
|
||||
void render(const Eigen::Affine3f& parentTrans) override;
|
||||
void renderSnapshot(const Eigen::Affine3f& parentTrans);
|
||||
|
||||
virtual void applyTheme(const std::shared_ptr<ThemeData>& theme, const std::string& view, const std::string& element, unsigned int properties) override;
|
||||
|
||||
|
|
|
@ -27,6 +27,9 @@ VideoPlayerComponent::~VideoPlayerComponent()
|
|||
void VideoPlayerComponent::render(const Eigen::Affine3f& parentTrans)
|
||||
{
|
||||
VideoComponent::render(parentTrans);
|
||||
|
||||
if (!mIsPlaying || mPlayerPid == -1)
|
||||
VideoComponent::renderSnapshot(parentTrans);
|
||||
}
|
||||
|
||||
void VideoPlayerComponent::setResize(float width, float height)
|
||||
|
|
|
@ -202,6 +202,8 @@ void VideoVlcComponent::render(const Eigen::Affine3f& parentTrans)
|
|||
glDisableClientState(GL_COLOR_ARRAY);
|
||||
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
} else {
|
||||
VideoComponent::renderSnapshot(parentTrans);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue