mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-09-14 13:56:48 +08:00
Added missing code for previous video FPS settings
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
This commit is contained in:
parent
94777fc34b
commit
1b1bec879d
@ -37,6 +37,8 @@ CProject* CProject::fromFile (const std::string& filename, CContainer* container
|
||||
{
|
||||
wallpaper = new CVideo (file.c_str ());
|
||||
}
|
||||
else if (type == "web")
|
||||
throw std::runtime_error ("Web wallpapers not supported yet");
|
||||
else
|
||||
throw std::runtime_error ("Unsupported wallpaper type");
|
||||
|
||||
|
@ -243,3 +243,8 @@ void CContext::setMouse (CMouseInput* mouse)
|
||||
{
|
||||
this->m_mouse = mouse;
|
||||
}
|
||||
|
||||
CWallpaper* CContext::getWallpaper () const
|
||||
{
|
||||
return this->m_wallpaper;
|
||||
}
|
@ -25,6 +25,7 @@ namespace WallpaperEngine::Render
|
||||
void setDefaultViewport (glm::vec4 defaultViewport);
|
||||
CMouseInput* getMouse () const;
|
||||
void setMouse (CMouseInput* mouse);
|
||||
CWallpaper* getWallpaper () const;
|
||||
|
||||
private:
|
||||
Display* m_display;
|
||||
|
@ -371,4 +371,9 @@ int CVideo::getHeight ()
|
||||
return this->m_codecCtx->height;
|
||||
}
|
||||
|
||||
int CVideo::getFPS ()
|
||||
{
|
||||
return this->m_codecCtx->framerate.num;
|
||||
}
|
||||
|
||||
const std::string CVideo::Type = "video";
|
||||
|
@ -25,6 +25,8 @@ namespace WallpaperEngine::Render
|
||||
int getWidth ();
|
||||
int getHeight ();
|
||||
|
||||
int getFPS ();
|
||||
|
||||
protected:
|
||||
void renderFrame (glm::ivec4 viewport) override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user