mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 19:58:53 +00:00
WiiSave: Allow users to specify export directory
Export and ExportAll now open a directory picker (that defaults to the previous default directory, i.e. the Dolphin user dir). Also removes the need to return the path in the export functions since the user knows which path they chose.
This commit is contained in:
parent
87e5cd73dc
commit
80b3d7ccb8
6 changed files with 35 additions and 35 deletions
|
@ -907,10 +907,15 @@ void MenuBar::ImportWiiSave()
|
|||
|
||||
void MenuBar::ExportWiiSaves()
|
||||
{
|
||||
const std::pair<size_t, std::string> result = WiiSave::ExportAll();
|
||||
const QString export_dir = QFileDialog::getExistingDirectory(
|
||||
this, tr("Select Export Directory"), QString::fromStdString(File::GetUserPath(D_USER_IDX)),
|
||||
QFileDialog::ShowDirsOnly);
|
||||
if (export_dir.isEmpty())
|
||||
return;
|
||||
|
||||
const size_t count = WiiSave::ExportAll(export_dir.toStdString());
|
||||
QMessageBox::information(this, tr("Save Export"),
|
||||
tr("Exported %n save(s) to %1", "", static_cast<int>(result.first))
|
||||
.arg(QString::fromStdString(result.second)));
|
||||
tr("Exported %n save(s)", "", static_cast<int>(count)));
|
||||
}
|
||||
|
||||
void MenuBar::CheckNAND()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue