diff --git a/RetroFE/Source/Collection/CollectionInfoBuilder.cpp b/RetroFE/Source/Collection/CollectionInfoBuilder.cpp index c7f93ff96..6b59ba151 100644 --- a/RetroFE/Source/Collection/CollectionInfoBuilder.cpp +++ b/RetroFE/Source/Collection/CollectionInfoBuilder.cpp @@ -165,6 +165,7 @@ CollectionInfo *CollectionInfoBuilder::buildCollection(std::string name, std::st std::string metadataType = name; std::string metadataPath; + // todo make array of listItemsPaths conf_.getCollectionAbsolutePath(name, listItemsPath); (void)conf_.getProperty(extensionsKey, extensions); @@ -183,7 +184,7 @@ CollectionInfo *CollectionInfoBuilder::buildCollection(std::string name, std::st Logger::write(Logger::ZONE_NOTICE, "Collections", ss.str()); } - + // pas into this CollectionInfo *collection = new CollectionInfo(name, listItemsPath, extensions, metadataType, metadataPath); (void)conf_.getProperty("collections." + collection->name + ".launcher", collection->launcher); @@ -290,7 +291,6 @@ bool CollectionInfoBuilder::ImportDirectory(CollectionInfo *info, std::string me if (mergedCollectionName != "") { - std::string mergedFile = Utils::combinePath(Configuration::absolutePath, "collections", mergedCollectionName, info->name + ".sub"); Logger::write(Logger::ZONE_INFO, "CollectionInfoBuilder", "Checking for \"" + mergedFile + "\""); (void)conf_.getProperty("collections." + mergedCollectionName + ".list.includeMissingItems", showMissing); @@ -327,6 +327,7 @@ bool CollectionInfoBuilder::ImportDirectory(CollectionInfo *info, std::string me { do { + // todo loop through path array and still support ';' seperators std::string rompath; size_t position = path.find( ";" ); if(position != std::string::npos) @@ -662,7 +663,8 @@ void CollectionInfoBuilder::ImportRomDirectory(std::string path, CollectionInfo Logger::write(Logger::ZONE_INFO, "CollectionInfoBuilder", "Could not read directory \"" + path + "\". Ignore if this is a menu."); return; } - + // todo " reads one path first and then the other, so if there are 20 roms in the first path, it orders that one first and then shows the other roms from the second path." + // todo confirm it merges both paths and orders them all together while(dp != NULL && (dirp = readdir(dp)) != NULL) { std::string file = dirp->d_name; diff --git a/RetroFE/Source/Execute/Launcher.cpp b/RetroFE/Source/Execute/Launcher.cpp index 116fef79a..9baa10f92 100644 --- a/RetroFE/Source/Execute/Launcher.cpp +++ b/RetroFE/Source/Execute/Launcher.cpp @@ -67,6 +67,10 @@ bool Launcher::run(std::string collection, Item *collectionItem) Logger::write(Logger::ZONE_ERROR, "Launcher", "No file extensions configured for collection \"" + collection + "\""); return false; } + + // todo populate array of selectedItemDirectories + // loop to 9, pass in index into function to pass into getCollectionAbsolutePath to build path0-9 + // and at the end check if any directory has items then show below error if(!collectionDirectory(selectedItemsDirectory, collection)) { Logger::write(Logger::ZONE_ERROR, "Launcher", "Could not find files in directory \"" + selectedItemsDirectory + "\" for collection \"" + collection + "\""); @@ -78,13 +82,15 @@ bool Launcher::run(std::string collection, Item *collectionItem) return false; } - + // todo maybe move before collectionDirectory if it's just going to overwrite it // Overwrite selectedItemsDirectory if already set in the file if (collectionItem->filepath != "") { selectedItemsDirectory = collectionItem->filepath; } + // todo pass selectedItemDirectories to loop on to find + // todo return from find path selectedItemsPath to be used in replaceVariables // It is ok to continue if the file could not be found. We could be launching a merged romset if (collectionItem->file == "") findFile(selectedItemsPath, matchedExtension, selectedItemsDirectory, collectionItem->name, extensionstr); @@ -358,6 +364,7 @@ bool Launcher::collectionDirectory(std::string &directory, std::string collectio return true; } +// todo support selectedItemDirectories array to loop on to find file bool Launcher::findFile(std::string &foundFilePath, std::string &foundFilename, std::string directory, std::string filenameWithoutExtension, std::string extensions) { std::string extension; diff --git a/RetroFE/Source/RetroFE.cpp b/RetroFE/Source/RetroFE.cpp index 31abf8c2e..b25866e34 100644 --- a/RetroFE/Source/RetroFE.cpp +++ b/RetroFE/Source/RetroFE.cpp @@ -1670,7 +1670,7 @@ RetroFE::RETROFE_STATE RetroFE::processUserInput( Page *page ) page->togglePlaylist( ); state = RETROFE_PLAYLIST_REQUEST; } - } + } else if ( input_.keystate(UserInput::KeyCodeSkipForward) ) {