From e0324d52558f3d870922303a02e28755c1b45cfd Mon Sep 17 00:00:00 2001 From: Pere Pujal i Carabantes Date: Fri, 9 Mar 2018 00:13:26 +0100 Subject: [PATCH] Config files missmatch in Android --- src/tuxpaint.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tuxpaint.c b/src/tuxpaint.c index 233cd308d..92f7131c5 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -22246,9 +22246,9 @@ static void setup_config(char *argv[]) /* Mac OS X: Use a "tuxpaint.cfg" file in the Tux Paint application support folder */ snprintf(str, sizeof(str), "%s/tuxpaint.cfg", macos.preferencesPath()); #elif defined(__ANDROID__) - /* Try to find the first config file: /mnt/sdcard/Android/data/org.tuxpaint/files/tuxpaint.cfg */ - // Donot rely on this file unless you want to override another tuxpaint.cfg in the internal path for debug - snprintf(str, sizeof(str), "%s/tuxpaint.cfg", savedir); + /* Try to find the user's config file */ + /* This file is writed by the tuxpaint config activity when the user runs it */ + snprintf(str, sizeof(str), "%s/tuxpaint.cfg", SDL_AndroidGetExternalStoragePath()); #else /* Linux and other Unixes: Use 'rc' style (~/.tuxpaintrc) */ /* it should it be "~/.tuxpaint/tuxpaintrc" instead, but too late now */ @@ -22281,9 +22281,9 @@ static void setup_config(char *argv[]) snprintf(str, sizeof(str), "%s/tuxpaint.cfg", macos_globalPreferencesPath()); parse_file_options(&tmpcfg_sys, str); #elif defined(__ANDROID__) - /* Try to find the second config file: /data/data/org.tuxpaint/files/tuxpaint.cfg */ - /* This file is unzipped from "assets/tuxpaint.zip" and will be modified when users want to set differnt configuraion */ - snprintf(str, sizeof(str), "%s/tuxpaint.cfg", SDL_AndroidGetInternalStoragePath()); + /* Load the config file we provide in assets/etc/tuxpaint.cfg */ + snprintf(str, sizeof(str), "etc/tuxpaint.cfg"); + parse_file_options(&tmpcfg_sys, str); #else /* normally /etc/tuxpaint/tuxpaint.conf */