Index: pcsx2.snapshot-3204/pcsx2/gui/AppInit.cpp =================================================================== --- pcsx2.snapshot-3204.orig/pcsx2/gui/AppInit.cpp 2010-06-12 12:50:20.000000000 +0200 +++ pcsx2.snapshot-3204/pcsx2/gui/AppInit.cpp 2010-06-12 12:52:36.481970859 +0200 @@ -60,7 +60,7 @@ void Pcsx2App::WipeUserModeSettings() { - wxDirName usrlocaldir( wxStandardPaths::Get().GetUserLocalDataDir() ); + wxDirName usrlocaldir = PathDefs::GetDocuments(DocsFolder_User); if( !usrlocaldir.Exists() ) return; wxString cwd( Path::Normalize( wxGetCwd() ) ); @@ -89,7 +89,7 @@ // void Pcsx2App::ReadUserModeSettings() { - wxDirName usrlocaldir( wxStandardPaths::Get().GetUserLocalDataDir() ); + wxDirName usrlocaldir = PathDefs::GetDocuments(DocsFolder_User); if( !usrlocaldir.Exists() ) { Console.WriteLn( L"Creating UserLocalData folder: " + usrlocaldir.ToString() ); Index: pcsx2.snapshot-3204/pcsx2/gui/Panels/MiscPanelStuff.cpp =================================================================== --- pcsx2.snapshot-3204.orig/pcsx2/gui/Panels/MiscPanelStuff.cpp 2010-06-12 12:50:20.000000000 +0200 +++ pcsx2.snapshot-3204/pcsx2/gui/Panels/MiscPanelStuff.cpp 2010-06-12 12:52:36.483096204 +0200 @@ -48,7 +48,7 @@ { RadioPanelItem( _("User Documents (recommended)"), - _("Location: ") + wxStandardPaths::Get().GetDocumentsDir() + _("Location: ") + PathDefs::GetDocuments(DocsFolder_User).GetFilename().GetFullPath() ), RadioPanelItem( Index: pcsx2.snapshot-3204/pcsx2/gui/AppConfig.cpp =================================================================== --- pcsx2.snapshot-3204.orig/pcsx2/gui/AppConfig.cpp 2010-06-12 12:52:36.196212791 +0200 +++ pcsx2.snapshot-3204/pcsx2/gui/AppConfig.cpp 2010-06-13 14:25:54.838664713 +0200 @@ -98,9 +98,27 @@ // share with other programs: screenshots, memory cards, and savestates. wxDirName GetDocuments( DocsModeType mode ) { + wxDirName user_local_dir; +#ifdef __LINUX__ + wxString xdg_home_value; + if( wxGetEnv(L"XDG_CONFIG_HOME", &xdg_home_value) ) { + if ( xdg_home_value.IsEmpty() ) { + // variable exist but it is empty. So use the default value + user_local_dir = (wxDirName)Path::Combine( wxStandardPaths::Get().GetDocumentsDir() , wxDirName( L".config/pcsx2" )); + } else { + user_local_dir = (wxDirName)Path::Combine( xdg_home_value, wxGetApp().GetAppName()); + } + } else { + // variable do not exist + user_local_dir = (wxDirName)Path::Combine( wxStandardPaths::Get().GetDocumentsDir() , wxDirName( L".config/pcsx2" )); + } +#else + user_local_dir = (wxDirName)Path::Combine( wxStandardPaths::Get().GetDocumentsDir() , wxGetApp().GetAppName() ); +#endif + switch( mode ) { - case DocsFolder_User: return (wxDirName)Path::Combine( wxStandardPaths::Get().GetDocumentsDir(), wxGetApp().GetAppName() ); + case DocsFolder_User: return user_local_dir; //case DocsFolder_CWD: return (wxDirName)wxGetCwd(); case DocsFolder_Custom: return CustomDocumentsFolder;