From 915befecc5dc6d48a2c0ef985eba0c6192361494 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Thu, 23 Feb 2023 12:07:04 +0100 Subject: [PATCH] Re-enable verbose logging on Android Without recompiling, there's no way to see it in logcat otherwise. --- src/porting_android.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/porting_android.cpp b/src/porting_android.cpp index 83b590b99..3604684a1 100644 --- a/src/porting_android.cpp +++ b/src/porting_android.cpp @@ -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; -- 2.44.0