diff --git a/RetroFE/Source/Graphics/Component/Video.cpp b/RetroFE/Source/Graphics/Component/Video.cpp index 0517943..fef1df0 100644 --- a/RetroFE/Source/Graphics/Component/Video.cpp +++ b/RetroFE/Source/Graphics/Component/Video.cpp @@ -23,6 +23,9 @@ #include "../../SDL.h" +bool Video::enabled_ = true; + + Video::Video(std::string file, std::string altFile, int numLoops, Page &p, float scaleX, float scaleY) : Component(p) , video_(NULL) @@ -46,6 +49,12 @@ Video::~Video( ) } +void Video::setEnabled(bool enabled) +{ + enabled_ = enabled; +} + + void Video::update(float dt) { if(video_) @@ -78,7 +87,7 @@ void Video::allocateGraphicsMemory( ) Component::allocateGraphicsMemory( ); - if (!video_) + if (enabled_ && !video_) { std::string file = ""; diff --git a/RetroFE/Source/Graphics/Component/Video.h b/RetroFE/Source/Graphics/Component/Video.h index 04f94c9..ff81822 100644 --- a/RetroFE/Source/Graphics/Component/Video.h +++ b/RetroFE/Source/Graphics/Component/Video.h @@ -24,6 +24,7 @@ class Video : public Component public: Video( std::string file, std::string altFile, int numLoops, Page &page, float scaleX, float scaleY ); virtual ~Video( ); + static void setEnabled(bool enabled); void update(float dt); void freeGraphicsMemory( ); void allocateGraphicsMemory( ); @@ -37,4 +38,8 @@ protected: int numLoops_; float scaleX_; float scaleY_; + +private: + static bool enabled_; + }; diff --git a/RetroFE/Source/RetroFE.cpp b/RetroFE/Source/RetroFE.cpp index e4e9f70..c6fc334 100644 --- a/RetroFE/Source/RetroFE.cpp +++ b/RetroFE/Source/RetroFE.cpp @@ -28,6 +28,7 @@ #include "Graphics/PageBuilder.h" #include "Graphics/Page.h" #include "Graphics/Component/ScrollingList.h" +#include "Graphics/Component/Video.h" #include "Video/VideoFactory.h" #include #include @@ -214,6 +215,7 @@ void RetroFE::run() VideoFactory::setEnabled(videoEnable); VideoFactory::setNumLoops(videoLoop); VideoFactory::createVideo(); // pre-initialize the gstreamer engine + Video::setEnabled(videoEnable); initializeThread = SDL_CreateThread(initialize, "RetroFEInit", (void *)this); diff --git a/RetroFE/Source/Version.cpp b/RetroFE/Source/Version.cpp index 81d0bbc..35d198a 100644 --- a/RetroFE/Source/Version.cpp +++ b/RetroFE/Source/Version.cpp @@ -20,7 +20,7 @@ std::string retrofe_version_major = "0"; std::string retrofe_version_minor = "7"; -std::string retrofe_version_build = "6"; +std::string retrofe_version_build = "7"; std::string Version::getString()