mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-12 17:58:53 +01:00
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:
parent
a116306eeb
commit
95cd4b5f05
@ -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 + ")");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user