From 0e8f8e8bef13578e7cbe74f2ed7cd7d0363a6bc2 Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Sat, 9 Jun 2018 12:11:33 +0200 Subject: [PATCH] Retrieve the base path on Android too --- src/misc.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/misc.cxx b/src/misc.cxx index 3884ec7..36d1148 100644 --- a/src/misc.cxx +++ b/src/misc.cxx @@ -113,6 +113,9 @@ GetShareDir () if (!basePath.size ()) { auto sdlBasePath = SDL_GetBasePath (); + auto platform = SDL_GetPlatform (); + if (platform && !strcmp (platform, "Android")) + sdlBasePath = SDL_strdup (SDL_AndroidGetInternalStoragePath ()); sdlBasePath[strlen (sdlBasePath) - 1] = '\0';