Added support for launcher settings per game. RetroFE will check for

collections/<collection name>/launchers/<game name>.conf file. This file
should contain a single line containing the name of the launcher that should
be called for that game. If no such file is found, or if the file is empty,
the default launcher for that collection will be used in stead.
This commit is contained in:
Pieter Hulshoff 2017-01-20 15:40:58 +01:00
parent a116306eeb
commit 95cd4b5f05

View File

@ -46,6 +46,17 @@ bool Launcher::run(std::string collection, Item *collectionItem)
std::string matchedExtension;
std::string args;
std::string launcherFile = Utils::combinePath( Configuration::absolutePath, "collections", collectionItem->collectionInfo->name, "launchers", collectionItem->name + ".conf" );
std::ifstream launcherStream( launcherFile.c_str( ) );
if (launcherStream.good( )) // Launcher file found
{
std::string line;
if (std::getline( launcherStream, line)) // Launcher found
{
launcherName = line;
}
}
if(!launcherExecutable(executablePath, launcherName))
{
Logger::write(Logger::ZONE_ERROR, "Launcher", "Failed to find launcher executable (launcher: " + launcherName + " executable: " + executablePath + ")");