diff --git a/RetroFE/Source/Graphics/PageBuilder.cpp b/RetroFE/Source/Graphics/PageBuilder.cpp index fdf6ed7..6e8b5c8 100644 --- a/RetroFE/Source/Graphics/PageBuilder.cpp +++ b/RetroFE/Source/Graphics/PageBuilder.cpp @@ -183,16 +183,19 @@ Page *PageBuilder::buildPage( std::string collectionName ) // load sounds for(xml_node<> *sound = root->first_node("sound"); sound; sound = sound->next_sibling("sound")) { - xml_attribute<> *src = sound->first_attribute("src"); + xml_attribute<> *src = sound->first_attribute("src"); xml_attribute<> *type = sound->first_attribute("type"); - std::string file = Configuration::convertToAbsolutePath(layoutPath, src->value()); + std::string file = Configuration::convertToAbsolutePath(layoutPath, src->value()); + std::string layoutName; + config_.getProperty("layout", layoutName); + std::string altfile = Utils::combinePath(Configuration::absolutePath, "layouts", layoutName, std::string(src->value())); if(!type) { Logger::write(Logger::ZONE_ERROR, "Layout", "Sound tag missing type attribute"); } else { - Sound *sound = new Sound(file); + Sound *sound = new Sound(file, altfile); std::string soundType = type->value(); if(!soundType.compare("load")) diff --git a/RetroFE/Source/RetroFE.cpp b/RetroFE/Source/RetroFE.cpp index 2a9d2a0..e703331 100644 --- a/RetroFE/Source/RetroFE.cpp +++ b/RetroFE/Source/RetroFE.cpp @@ -414,7 +414,10 @@ void RetroFE::run() currentPage_->onNewItemSelected(); currentPage_->reallocateMenuSpritePoints(); - currentPage_->enterMenu(); + if (currentPage_->getMenuDepth() != 1 ) + { + currentPage_->enterMenu(); + } state = RETROFE_NEXT_PAGE_MENU_ENTER; diff --git a/RetroFE/Source/Sound/Sound.cpp b/RetroFE/Source/Sound/Sound.cpp index ef39483..02861c7 100644 --- a/RetroFE/Source/Sound/Sound.cpp +++ b/RetroFE/Source/Sound/Sound.cpp @@ -18,13 +18,17 @@ #include "../Utility/Log.h" -Sound::Sound(std::string file) +Sound::Sound(std::string file, std::string altfile) : file_(file) , chunk_(NULL) { if(!allocate()) { - Logger::write(Logger::ZONE_ERROR, "Sound", "Cannot load " + file_); + file_ = altfile; + if (!allocate()) + { + Logger::write(Logger::ZONE_ERROR, "Sound", "Cannot load " + file_); + } } } diff --git a/RetroFE/Source/Sound/Sound.h b/RetroFE/Source/Sound/Sound.h index 55525d4..3f06682 100644 --- a/RetroFE/Source/Sound/Sound.h +++ b/RetroFE/Source/Sound/Sound.h @@ -20,7 +20,7 @@ class Sound { public: - Sound(std::string file); + Sound(std::string file, std::string altfile); virtual ~Sound(); void play(); bool allocate();