Fixed bug where <video> continued playing upon launch. Video needs to be turned off when a game is launched, and restarted when the game is complete.

This commit is contained in:
Pieter Hulshoff 2017-04-23 22:28:54 +02:00
parent 596e783eb1
commit 6b14ee64cd
2 changed files with 11 additions and 0 deletions

View File

@ -39,6 +39,15 @@ Video::Video(std::string file, std::string altFile, int numLoops, Page &p, float
allocateGraphicsMemory( );
}
void Video::launchEnter()
{
freeGraphicsMemory();
}
void Video::launchExit()
{
allocateGraphicsMemory();
}
Video::~Video( )
{

View File

@ -28,6 +28,8 @@ public:
void update(float dt);
void freeGraphicsMemory( );
void allocateGraphicsMemory( );
void launchEnter();
void launchExit();
void draw( );
virtual bool isPlaying( );