From 61256fe9997f0bda130f5bb60bd9d5c20a43032c Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 27 Jul 2012 19:22:57 +0000 Subject: [PATCH] - play intro music as soon as possible --- source/glest_game/main/intro.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/glest_game/main/intro.cpp b/source/glest_game/main/intro.cpp index 9ba45ce7..6f34f5cf 100644 --- a/source/glest_game/main/intro.cpp +++ b/source/glest_game/main/intro.cpp @@ -93,6 +93,14 @@ Intro::Intro(Program *program): if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); CoreData &coreData= CoreData::getInstance(); + SoundRenderer &soundRenderer= SoundRenderer::getInstance(); + + if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false && + (Shared::Graphics::VideoPlayer::hasBackEndVideoPlayer() == false || + CoreData::getInstance().hasIntroVideoFilename() == false)) { + soundRenderer.playMusic(CoreData::getInstance().getIntroMusic()); + } + const Metrics &metrics= Metrics::getInstance(); int w= metrics.getVirtualW(); int h= metrics.getVirtualH(); @@ -489,8 +497,6 @@ Intro::Intro(Program *program): //md5Test = Shared::Graphics::md5::getMD5ObjectFromLoaderScript("/home/softcoder/Code/megaglest/trunk/mk/linux/mydata/test/mv1/mv1.loader"); //md5Test = Shared::Graphics::md5::getMD5ObjectFromLoaderScript("/home/softcoder/Code/megaglest/trunk/mk/linux/mydata/test/mv1/mv2.loader"); - SoundRenderer &soundRenderer= SoundRenderer::getInstance(); - SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false && @@ -527,8 +533,6 @@ Intro::Intro(Program *program): return; } - soundRenderer.playMusic(CoreData::getInstance().getIntroMusic()); - SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); }