mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-12 17:58:53 +01:00
Global videoEnable parameter now also enables/disables intro videos and background videos.
This commit is contained in:
parent
051eec348f
commit
6b3bae4344
@ -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 = "";
|
||||
|
||||
|
||||
@ -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_;
|
||||
|
||||
};
|
||||
|
||||
@ -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 <vector>
|
||||
#include <string>
|
||||
@ -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);
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user