mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06: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:
@ -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()
|
||||
|
Reference in New Issue
Block a user