SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
WAIHelper.cpp
Go to the documentation of this file.
1 #include "WAIHelper.h"
2 
3 #ifdef WAI_OS_ANDROID
4 # include <android/log.h>
5 #endif
6 
7 //DebugLogCallback debugLogCallback;
8 //
9 //void registerDebugCallback(DebugLogCallback callback)
10 //{
11 // if (callback)
12 // {
13 // debugLogCallback = callback;
14 // debugLogCallback("callback registered");
15 // }
16 //}
17 //
18 //#define MAX_LOG_LENGTH 9999
19 //void Utils::log("WAI",const char* format, ...)
20 //{
21 // char buffer[MAX_LOG_LENGTH];
22 // va_list args;
23 // va_start(args, format);
24 // int ret = vsnprintf(buffer, MAX_LOG_LENGTH, format, args);
25 // va_end(args);
26 //
27 // if (!debugLogCallback)
28 // {
29 //#ifdef __APPLE__
30 // printf("%s\n", buffer);
31 //#elif defined(WAI_OS_ANDROID)
32 // __android_log_print(ANDROID_LOG_INFO, "lib-WAI", "%s\n", buffer);
33 //#elif defined(WAI_OS_WINDOWS)
34 // printf("%s\n", buffer);
35 //#elif defined(WAI_OS_LINUX)
36 // printf("%s\n", buffer);
37 //#endif
38 // }
39 // else
40 // {
41 // debugLogCallback(buffer);
42 // }
43 //}