diff --git a/docs/FRONTENDS.md b/docs/FRONTENDS.md index 95a64dfe..2eee2898 100644 --- a/docs/FRONTENDS.md +++ b/docs/FRONTENDS.md @@ -81,6 +81,12 @@ media files into the `downloaded_media` folder (e.g. `~/ES-DE/downloaded_media//screenshots/` for screenshots) from where ES-DE will pick them up. Note that ES-DE does not support textures currently. +!!! tip + + You may override the default storage folder of ES-DE (`/home//ES-DE`) + on a non-Windows build by setting the environment variable `ESDE_APPDATA_DIR` + to a different folder as documented in the ES-DE documentation [here](https://gitlab.com/es-de/emulationstation-de/-/blob/v3.0.2/INSTALL.md#changing-the-application-data-directory). + All the gory details of ES-DE's gamelist file format you can find in the section "Gamelist Reference" [here](https://gitlab.com/es-de/emulationstation-de/-/blob/master/INSTALL.md?ref_type=heads#gamelistxml). diff --git a/src/esde.cpp b/src/esde.cpp index dbaa0f34..f7703be7 100644 --- a/src/esde.cpp +++ b/src/esde.cpp @@ -23,12 +23,21 @@ #include "gameentry.h" #include +#include #include #include Esde::Esde() {} inline const QString baseFolder() { +#if !(defined Q_OS_WIN || defined Q_OS_ANDROID) + // https://gitlab.com/es-de/emulationstation-de/-/blob/v3.0.2/INSTALL.md#changing-the-application-data-directory + QString appdata = + QProcessEnvironment::systemEnvironment().value("ESDE_APPDATA_DIR", ""); + if (!appdata.isEmpty()) { + return appdata; + } +#endif return QString(QDir::homePath() % "/ES-DE"); }