Signed-off-by: Alexis Maiquez <almamu@almamu.com>
@@ -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");
@@ -242,4 +242,9 @@ CMouseInput* CContext::getMouse () const
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;