Skip to content

Commit

Permalink
Merge pull request #5538 from Starsam80/qt-remove-lastfilename
Browse files Browse the repository at this point in the history
Qt: Remove booting from the last path
  • Loading branch information
Helios747 committed Jun 5, 2017
2 parents 2f41345 + e1ea680 commit e27412d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 18 deletions.
7 changes: 1 addition & 6 deletions Source/Core/DolphinQt2/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,7 @@ void MainWindow::Play()
}
else
{
QString last_path = Settings().GetLastGame();
if (!last_path.isEmpty() && QFile::exists(last_path))
StartGame(last_path);
else
Open();
Open();
}
}
}
Expand Down Expand Up @@ -304,7 +300,6 @@ void MainWindow::StartGame(const QString& path)
QMessageBox::critical(this, tr("Error"), tr("Failed to init core"), QMessageBox::Ok);
return;
}
Settings().SetLastGame(path);
ShowRenderWidget();
emit EmulationStarted();

Expand Down
10 changes: 0 additions & 10 deletions Source/Core/DolphinQt2/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,6 @@ bool Settings::IsInDevelopmentWarningEnabled() const
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
{
return value(QStringLiteral("GameList/Paths")).toStringList();
Expand Down
2 changes: 0 additions & 2 deletions Source/Core/DolphinQt2/Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ class Settings final : public QSettings
bool IsInDevelopmentWarningEnabled() const;

// GameList
QString GetLastGame() const;
void SetLastGame(const QString& path);
QStringList GetPaths() const;
void SetPaths(const QStringList& paths);
void RemovePath(int i);
Expand Down

0 comments on commit e27412d

Please sign in to comment.