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 ());
|
wallpaper = new CVideo (file.c_str ());
|
||||||
}
|
}
|
||||||
|
else if (type == "web")
|
||||||
|
throw std::runtime_error ("Web wallpapers not supported yet");
|
||||||
else
|
else
|
||||||
throw std::runtime_error ("Unsupported wallpaper type");
|
throw std::runtime_error ("Unsupported wallpaper type");
|
||||||
|
|
||||||
|
@ -242,4 +242,9 @@ CMouseInput* CContext::getMouse () const
|
|||||||
void CContext::setMouse (CMouseInput* mouse)
|
void CContext::setMouse (CMouseInput* mouse)
|
||||||
{
|
{
|
||||||
this->m_mouse = 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);
|
void setDefaultViewport (glm::vec4 defaultViewport);
|
||||||
CMouseInput* getMouse () const;
|
CMouseInput* getMouse () const;
|
||||||
void setMouse (CMouseInput* mouse);
|
void setMouse (CMouseInput* mouse);
|
||||||
|
CWallpaper* getWallpaper () const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Display* m_display;
|
Display* m_display;
|
||||||
|
@ -371,4 +371,9 @@ int CVideo::getHeight ()
|
|||||||
return this->m_codecCtx->height;
|
return this->m_codecCtx->height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int CVideo::getFPS ()
|
||||||
|
{
|
||||||
|
return this->m_codecCtx->framerate.num;
|
||||||
|
}
|
||||||
|
|
||||||
const std::string CVideo::Type = "video";
|
const std::string CVideo::Type = "video";
|
||||||
|
@ -25,6 +25,8 @@ namespace WallpaperEngine::Render
|
|||||||
int getWidth ();
|
int getWidth ();
|
||||||
int getHeight ();
|
int getHeight ();
|
||||||
|
|
||||||
|
int getFPS ();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void renderFrame (glm::ivec4 viewport) override;
|
void renderFrame (glm::ivec4 viewport) override;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user