Merge pull request #5538 from Starsam80/qt-remove-lastfilename
Qt: Remove booting from the last path
This commit is contained in:
commit
e27412d2c2
|
@ -213,11 +213,7 @@ void MainWindow::Play()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QString last_path = Settings().GetLastGame();
|
Open();
|
||||||
if (!last_path.isEmpty() && QFile::exists(last_path))
|
|
||||||
StartGame(last_path);
|
|
||||||
else
|
|
||||||
Open();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -304,7 +300,6 @@ void MainWindow::StartGame(const QString& path)
|
||||||
QMessageBox::critical(this, tr("Error"), tr("Failed to init core"), QMessageBox::Ok);
|
QMessageBox::critical(this, tr("Error"), tr("Failed to init core"), QMessageBox::Ok);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Settings().SetLastGame(path);
|
|
||||||
ShowRenderWidget();
|
ShowRenderWidget();
|
||||||
emit EmulationStarted();
|
emit EmulationStarted();
|
||||||
|
|
||||||
|
|
|
@ -50,16 +50,6 @@ bool Settings::IsInDevelopmentWarningEnabled() const
|
||||||
return value(QStringLiteral("ShowDevelopmentWarning"), true).toBool();
|
return value(QStringLiteral("ShowDevelopmentWarning"), true).toBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Settings::GetLastGame() const
|
|
||||||
{
|
|
||||||
return value(QStringLiteral("GameList/LastGame")).toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Settings::SetLastGame(const QString& path)
|
|
||||||
{
|
|
||||||
setValue(QStringLiteral("GameList/LastGame"), path);
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList Settings::GetPaths() const
|
QStringList Settings::GetPaths() const
|
||||||
{
|
{
|
||||||
return value(QStringLiteral("GameList/Paths")).toStringList();
|
return value(QStringLiteral("GameList/Paths")).toStringList();
|
||||||
|
|
|
@ -33,8 +33,6 @@ public:
|
||||||
bool IsInDevelopmentWarningEnabled() const;
|
bool IsInDevelopmentWarningEnabled() const;
|
||||||
|
|
||||||
// GameList
|
// GameList
|
||||||
QString GetLastGame() const;
|
|
||||||
void SetLastGame(const QString& path);
|
|
||||||
QStringList GetPaths() const;
|
QStringList GetPaths() const;
|
||||||
void SetPaths(const QStringList& paths);
|
void SetPaths(const QStringList& paths);
|
||||||
void RemovePath(int i);
|
void RemovePath(int i);
|
||||||
|
|
Loading…
Reference in New Issue