From c90824f8e9a0190487af9b8e14f0504cc8609fcc Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 23 Jul 2022 00:01:47 +1000 Subject: [PATCH] Qt: Fix incorrect directories on Linux --- src/duckstation-qt/foldersettingswidget.ui | 3 --- src/duckstation-qt/qthost.cpp | 9 ++++----- src/duckstation-qt/settingsdialog.cpp | 4 ++-- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/duckstation-qt/foldersettingswidget.ui b/src/duckstation-qt/foldersettingswidget.ui index 2f2e0bfb5..a4d8561cb 100644 --- a/src/duckstation-qt/foldersettingswidget.ui +++ b/src/duckstation-qt/foldersettingswidget.ui @@ -201,8 +201,5 @@ - - - diff --git a/src/duckstation-qt/qthost.cpp b/src/duckstation-qt/qthost.cpp index 58b552c79..052827cb1 100644 --- a/src/duckstation-qt/qthost.cpp +++ b/src/duckstation-qt/qthost.cpp @@ -275,7 +275,7 @@ void QtHost::SetDataDirectory() } #if defined(_WIN32) - // On Windows, use My Documents\PCSX2 to match old installs. + // On Windows, use My Documents\DuckStation. PWSTR documents_directory; if (SUCCEEDED(SHGetKnownFolderPath(FOLDERID_Documents, 0, NULL, &documents_directory))) { @@ -284,16 +284,15 @@ void QtHost::SetDataDirectory() CoTaskMemFree(documents_directory); } #elif defined(__linux__) - // Use $XDG_CONFIG_HOME/PCSX2 if it exists. + // Use $XDG_CONFIG_HOME/duckstation if it exists. const char* xdg_config_home = getenv("XDG_CONFIG_HOME"); if (xdg_config_home && Path::IsAbsolute(xdg_config_home)) { - EmuFolders::DataRoot = Path::Combine(xdg_config_home, "PCSX2"); + EmuFolders::DataRoot = Path::Combine(xdg_config_home, "duckstation"); } else { - // Use ~/PCSX2 for non-XDG, and ~/.config/PCSX2 for XDG. - // Maybe we should drop the former when Qt goes live. + // Use ~/.local/share/duckstation otherwise. const char* home_dir = getenv("HOME"); if (home_dir) { diff --git a/src/duckstation-qt/settingsdialog.cpp b/src/duckstation-qt/settingsdialog.cpp index bba852d42..a3ed0068d 100644 --- a/src/duckstation-qt/settingsdialog.cpp +++ b/src/duckstation-qt/settingsdialog.cpp @@ -154,7 +154,7 @@ void SettingsDialog::addPages() addWidget( m_folder_settings = new FolderSettingsWidget(this, m_ui.settingsContainer), tr("Folders"), QStringLiteral("folder-settings-line"), - tr("Folder Settings
These options control where PCSX2 will save runtime data files.")); + tr("Folder Settings
These options control where DuckStation will save runtime data files.")); } addWidget(m_advanced_settings = new AdvancedSettingsWidget(this, m_ui.settingsContainer), tr("Advanced"), @@ -500,4 +500,4 @@ void SettingsDialog::openGamePropertiesDialog(const std::string& path, const std dialog->setWindowTitle(window_title); dialog->setModal(false); dialog->show(); -} \ No newline at end of file +}