Redirecting stdout to a more appropiate place for newer Androids.

This commit is contained in:
Pere Pujal i Carabantes 2023-06-29 20:10:49 +02:00
parent c7f83e4167
commit a303908aa9

View file

@ -30401,7 +30401,7 @@ int main(int argc, char *argv[])
/* EP added block to log messages */
freopen("/tmp/tuxpaint.log", "w", stdout); /* redirect stdout to a file */
#elif defined (__ANDROID__)
freopen("/mnt/sdcard/tuxpaint/tuxpaint.log", "w", stdout); /* redirect stdout to a file */
freopen("/storage/emulated/0/Android/data/org.tuxpaint/files/tuxpaint.log", "w", stdout); /* redirect stdout to a file */
#endif
dup2(fileno(stdout), fileno(stderr)); /* redirect stderr to stdout */