mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-04-02 10:16:50 +02:00
Moved layout detection to separate method.
This commit is contained in:
@@ -458,14 +458,7 @@ Page *RetroFE::LoadPage(std::string collectionName)
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string layoutKeyName = "collections." + collectionName + ".layout";
|
||||
std::string layoutName = "Default 16x9";
|
||||
|
||||
if(!Config.GetProperty(layoutKeyName, layoutName))
|
||||
{
|
||||
Config.GetProperty("layout", layoutName);
|
||||
}
|
||||
|
||||
std::string layoutName = GetLayout(collectionName);
|
||||
|
||||
if(PageChain.size() > 0)
|
||||
{
|
||||
@@ -490,3 +483,16 @@ Page *RetroFE::LoadPage(std::string collectionName)
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
std::string RetroFE::GetLayout(std::string collectionName)
|
||||
{
|
||||
std::string layoutKeyName = "collections." + collectionName + ".layout";
|
||||
std::string layoutName = "Default 16x9";
|
||||
|
||||
if(!Config.GetProperty(layoutKeyName, layoutName))
|
||||
{
|
||||
Config.GetProperty("layout", layoutName);
|
||||
}
|
||||
|
||||
return layoutName;
|
||||
}
|
||||
Reference in New Issue
Block a user