Debug: Use native logging on Android

This commit is contained in:
Jonas Kulla 2014-12-23 20:07:33 +01:00
parent a112529f53
commit 88c41bcc62
1 changed files with 9 additions and 0 deletions

View File

@ -26,6 +26,11 @@
#include <sstream>
#include <vector>
#ifdef __ANDROID__
#include <android/log.h>
#endif
/* A cheap replacement for qDebug() */
class Debug
@ -56,7 +61,11 @@ public:
~Debug()
{
#ifdef __ANDROID__
__android_log_write(ANDROID_LOG_DEBUG, "mkxp", buf.str().c_str());
#else
std::cerr << buf.str() << std::endl;
#endif
}
private: