]> git.lizzy.rs Git - minetest.git/commitdiff
Re-enable verbose logging on Android
authorsfan5 <sfan5@live.de>
Thu, 23 Feb 2023 11:07:04 +0000 (12:07 +0100)
committerSmallJoker <SmallJoker@users.noreply.github.com>
Thu, 2 Mar 2023 18:57:18 +0000 (19:57 +0100)
Without recompiling, there's no way to see it in logcat otherwise.

src/porting_android.cpp

index 83b590b99d016d76d8f86074726466005f15968f..3604684a186642306ccde481914d58cfb4f18811 100644 (file)
@@ -46,10 +46,9 @@ void android_main(android_app *app)
 
        Thread::setName("Main");
 
+       char *argv[] = {strdup(PROJECT_NAME), strdup("--verbose"), nullptr};
        try {
-               char *argv[] = {strdup(PROJECT_NAME), nullptr};
                main(ARRLEN(argv) - 1, argv);
-               free(argv[0]);
        } catch (std::exception &e) {
                errorstream << "Uncaught exception in main thread: " << e.what() << std::endl;
                retval = -1;
@@ -57,6 +56,8 @@ void android_main(android_app *app)
                errorstream << "Uncaught exception in main thread!" << std::endl;
                retval = -1;
        }
+       free(argv[0]);
+       free(argv[1]);
 
        porting::cleanupAndroid();
        infostream << "Shutting down." << std::endl;