mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
st/oxr: Route log output to Android logcat
This commit is contained in:
parent
becb825fab
commit
2e41280ae9
|
@ -22,6 +22,10 @@
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
|
#ifdef XRT_OS_ANDROID
|
||||||
|
#include <android/log.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define LOG_BUFFER_SIZE (1024)
|
#define LOG_BUFFER_SIZE (1024)
|
||||||
|
|
||||||
|
@ -91,9 +95,14 @@ print_prefix(struct oxr_logger *logger, const char *fmt, const char *prefix, cha
|
||||||
static void
|
static void
|
||||||
do_output(const char *buf)
|
do_output(const char *buf)
|
||||||
{
|
{
|
||||||
#ifdef XRT_OS_WINDOWS
|
#if defined(XRT_OS_WINDOWS)
|
||||||
OutputDebugStringA(buf);
|
OutputDebugStringA(buf);
|
||||||
|
|
||||||
|
if (debug_get_bool_option_no_printing_stderr()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#elif defined(XRT_OS_ANDROID)
|
||||||
|
__android_log_write(ANDROID_LOG_DEBUG, "OXR", buf);
|
||||||
if (debug_get_bool_option_no_printing_stderr()) {
|
if (debug_get_bool_option_no_printing_stderr()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue