Qt: Use native path separators for block dump

This commit is contained in:
Stenzek 2024-01-14 14:36:02 +10:00 committed by Connor McLaughlin
parent 0bbde2ca52
commit 165da677ed
1 changed files with 3 additions and 3 deletions

View File

@ -614,13 +614,13 @@ void MainWindow::onBlockDumpActionToggled(bool checked)
if (!checked)
return;
std::string old_directory(Host::GetBaseStringSettingValue("EmuCore", "BlockDumpSaveDirectory", ""));
std::string old_directory = Host::GetBaseStringSettingValue("EmuCore", "BlockDumpSaveDirectory", "");
if (old_directory.empty())
old_directory = FileSystem::GetWorkingDirectory();
// prompt for a location to save
const QString new_dir(
QFileDialog::getExistingDirectory(this, tr("Select location to save block dump:"), QString::fromStdString(old_directory)));
const QString new_dir(QDir::toNativeSeparators(
QFileDialog::getExistingDirectory(this, tr("Select location to save block dump:"), QString::fromStdString(old_directory))));
if (new_dir.isEmpty())
{
// disable it again