mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-01-27 02:05:06 +01:00
Moved layout detection to separate method.
This commit is contained in:
parent
457f2c180c
commit
df3fe6f314
@ -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;
|
||||
}
|
||||
@ -47,7 +47,7 @@ private:
|
||||
Page *LoadPage(std::string collectionName);
|
||||
RETROFE_STATE ProcessUserInput();
|
||||
void Update(float dt, bool scrollActive);
|
||||
|
||||
std::string GetLayout(std::string collectionName);
|
||||
|
||||
Configuration &Config;
|
||||
CollectionDatabase &CollectionDB;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user