Index: pcsx2.snapshot-3208/pcsx2/gui/AppConfig.cpp =================================================================== --- pcsx2.snapshot-3208.orig/pcsx2/gui/AppConfig.cpp 2010-06-15 13:13:00.230117552 +0200 +++ pcsx2.snapshot-3208/pcsx2/gui/AppConfig.cpp 2010-06-15 13:13:00.572085408 +0200 @@ -97,7 +97,24 @@ // Specifies the main configuration folder. wxDirName GetUserLocalDataDir() { - return wxDirName(wxStandardPaths::Get().GetUserLocalDataDir()); + 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().GetUserConfigDir() , 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().GetUserConfigDir() , wxDirName( L".config/pcsx2" )); + } +#else + user_local_dir = wxDirName(wxStandardPaths::Get().GetUserLocalDataDir()); +#endif + return user_local_dir; } // Fetches the path location for user-consumable documents -- stuff users are likely to want to