]> git.lizzy.rs Git - minetest.git/blobdiff - src/debug.cpp
Fix warnings and other misc. minor changes
[minetest.git] / src / debug.cpp
index 6bdd1bce55e8e1df910c898b1714afdfb6254b8c..8c02f1d6b00ad54a403b13b72afd2c1c575e8c7f 100644 (file)
@@ -18,6 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 */
 
 
+#include "porting.h"
 #include "debug.h"
 #include "exceptions.h"
 #include "threads.h"
@@ -25,9 +26,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include <stdlib.h>
 #include <cstring>
 #include <map>
-#include <jmutex.h>
-#include <jmutexautolock.h>
-
+#include "jthread/jmutex.h"
+#include "jthread/jmutexautolock.h"
+#include "config.h"
 /*
        Debug output
 */
@@ -95,6 +96,9 @@ class Debugbuf : public std::streambuf
        }
        std::streamsize xsputn(const char *s, std::streamsize n)
        {
+#ifdef __ANDROID__
+               __android_log_print(ANDROID_LOG_VERBOSE, PROJECT_NAME, "%s", s);
+#endif
                for(int i=0; i<DEBUGSTREAM_COUNT; i++)
                {
                        if(g_debugstreams[i] == stderr && m_disable_stderr)
@@ -206,7 +210,6 @@ JMutex g_debug_stacks_mutex;
 
 void debug_stacks_init()
 {
-       g_debug_stacks_mutex.Init();
 }
 
 void debug_stacks_print_to(std::ostream &os)