- bugfixes for playing videos in main menu

This commit is contained in:
Mark Vejvoda 2012-05-19 08:48:30 +00:00
parent 0d38e2eb5d
commit b7ba6e52d5
2 changed files with 6 additions and 5 deletions

View File

@ -535,8 +535,8 @@ Intro::~Intro() {
void Intro::update() {
if(exitAfterIntroVideo == true) {
//mouseUpLeft(0, 0);
cleanup();
mouseUpLeft(0, 0);
//cleanup();
return;
}
timer++;

View File

@ -96,7 +96,8 @@ void MainMenu::init() {
Renderer::getInstance().initMenu(this);
if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false &&
Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true) {
Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == true &&
CoreData::getInstance().hasMainMenuVideoFilename() == true) {
string introVideoFile = CoreData::getInstance().getMainMenuVideoFilename();
if(introVideoFile != "" && fileExists(introVideoFile)) {
Context *c= GraphicsInterface::getInstance().getCurrentContext();
@ -159,11 +160,11 @@ void MainMenu::render() {
//syncronus update
void MainMenu::update(){
if(menuBackgroundVideo != NULL) {
if(menuBackgroundVideo == NULL) {
Renderer::getInstance().updateParticleManager(rsMenu);
}
mouse2dAnim= (mouse2dAnim +1) % Renderer::maxMouse2dAnim;
if(menuBackgroundVideo != NULL) {
if(menuBackgroundVideo == NULL) {
menuBackground.update();
}
state->update();