Qt/Settings: Update default gamelist path textbox when changed

This commit is contained in:
spycrab
2018-01-31 19:58:02 +01:00
parent 987bec2fd5
commit 28ad12bf30
4 changed files with 22 additions and 3 deletions

View File

@ -72,6 +72,20 @@ void Settings::RemovePath(const QString& qpath)
emit PathRemoved(qpath);
}
QString Settings::GetDefaultGame() const
{
return QString::fromStdString(SConfig::GetInstance().m_strDefaultISO);
}
void Settings::SetDefaultGame(QString path)
{
if (GetDefaultGame() != path)
{
SConfig::GetInstance().m_strDefaultISO = path.toStdString();
emit DefaultGameChanged(path);
}
}
bool Settings::GetPreferredView() const
{
return QSettings().value(QStringLiteral("PreferredView"), true).toBool();