mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-22 22:05:38 +00:00
Qt: Fix incorrect directories on Linux
This commit is contained in:
parent
23ea7b92bc
commit
c90824f8e9
|
@ -201,8 +201,5 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../p2-qt-rebase/pcsx2-qt/resources/resources.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -154,7 +154,7 @@ void SettingsDialog::addPages()
|
|||
addWidget(
|
||||
m_folder_settings = new FolderSettingsWidget(this, m_ui.settingsContainer), tr("Folders"),
|
||||
QStringLiteral("folder-settings-line"),
|
||||
tr("<strong>Folder Settings</strong><hr>These options control where PCSX2 will save runtime data files."));
|
||||
tr("<strong>Folder Settings</strong><hr>These options control where DuckStation will save runtime data files."));
|
||||
}
|
||||
|
||||
addWidget(m_advanced_settings = new AdvancedSettingsWidget(this, m_ui.settingsContainer), tr("Advanced"),
|
||||
|
|
Loading…
Reference in a new issue