From b7ba6e52d5cd6182e4aaa8663d057764facdf50c Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sat, 19 May 2012 08:48:30 +0000 Subject: [PATCH] - bugfixes for playing videos in main menu --- source/glest_game/main/intro.cpp | 4 ++-- source/glest_game/menu/main_menu.cpp | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/source/glest_game/main/intro.cpp b/source/glest_game/main/intro.cpp index 9b1b6867..75d98437 100644 --- a/source/glest_game/main/intro.cpp +++ b/source/glest_game/main/intro.cpp @@ -535,8 +535,8 @@ Intro::~Intro() { void Intro::update() { if(exitAfterIntroVideo == true) { - //mouseUpLeft(0, 0); - cleanup(); + mouseUpLeft(0, 0); + //cleanup(); return; } timer++; diff --git a/source/glest_game/menu/main_menu.cpp b/source/glest_game/menu/main_menu.cpp index f9b0ef34..bf7a880e 100644 --- a/source/glest_game/menu/main_menu.cpp +++ b/source/glest_game/menu/main_menu.cpp @@ -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();