Android: use a sharable location for our files

The first location we should try is one that allows us to share files.
In theory this should work on every device, but we do have a few
fall-backs, just in case.

This also moves the Android specific include to the top which seems much
more standard.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2022-02-26 18:17:07 +00:00
parent aa41fbbf79
commit 43ed2e1224
2 changed files with 7 additions and 5 deletions

View file

@ -48,7 +48,8 @@ bool subsurface_ignore_font(const char *font)
static const char *system_default_path_append(const char *append)
{
// Qt appears to find a working path for us - let's just go with that
QString path = QStandardPaths::standardLocations(QStandardPaths::DataLocation).first();
// AppDataLocation allows potential sharing of the files we put there
QString path = QStandardPaths::standardLocations(QStandardPaths::AppDataLocation).first();
if (append)
path += QString("/%1").arg(append);