Changing Android save paths to now default to the 'external' dir from the device itself.

Merging the src/tuxpaint.c change from
https://github.com/tux4kids/Tuxpaint-Android/pull/18
(e23803b1f2)

Per Terrence
This commit is contained in:
Bill Kendrick 2022-07-07 17:44:51 -07:00
parent c78644e40d
commit da15f8c282
2 changed files with 10 additions and 2 deletions

View file

@ -7,7 +7,7 @@ Various contributors (see below, and AUTHORS.txt)
http://www.tuxpaint.org/
2022.July.3 (0.9.29)
2022.July.7 (0.9.29)
* Bug Fixes:
----------
* Opening and immediately dismissing Color Mixer could cause
@ -92,6 +92,8 @@ http://www.tuxpaint.org/
* Various Android port updates
* FIXME: Pere & Terrence, can you enumerate them here???
* Changing Android save paths to now default to the 'external' dir from the device itself.
https://github.com/tux4kids/Tuxpaint-Android/pull/18
Terrence Sheflin <terrence.sheflin@gmail.com>
Pere Pujal i Carabantes <perepujal@gmail.com>

View file

@ -22,7 +22,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt)
June 14, 2002 - July 3, 2022
June 14, 2002 - July 7, 2022
*/
#include "platform.h"
@ -26406,6 +26406,12 @@ static void setup_config(char *argv[])
picturesdir = GetUserImageDir();
#elif __APPLE__
picturesdir = strdup(apple_picturesPath());
#elif __ANDROID__
picturesdir = strdup(SDL_AndroidGetExternalStoragePath());
char* substring = strstr(picturesdir, "/Android");
if (substring != NULL) {
strcpy(substring, "/Pictures");
}
#else
picturesdir = get_xdg_user_dir("PICTURES", "Pictures");
#endif