Debug: Use native logging on Android
This commit is contained in:
parent
a112529f53
commit
88c41bcc62
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue