GLES2N64 (from mupen64plus-ae) plugin. Compile and run on the OpenPandora
[mupen64plus-pandora.git] / source / gles2n64 / src / Common.h
diff --git a/source/gles2n64/src/Common.h b/source/gles2n64/src/Common.h
new file mode 100755 (executable)
index 0000000..ac508cd
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef __COMMON_H__
+#define __COMMON_H__
+
+//#define PROFILE_GBI
+
+#define LOG_NONE       0
+#define LOG_ERROR   1
+#define LOG_MINIMAL    2
+#define LOG_WARNING 3
+#define LOG_VERBOSE 4
+
+#define LOG_LEVEL LOG_NONE
+
+# ifndef min
+#  define min(a,b) ((a) < (b) ? (a) : (b))
+# endif
+# ifndef max
+#  define max(a,b) ((a) > (b) ? (a) : (b))
+# endif
+
+
+#if LOG_LEVEL>0
+
+#include <android/log.h>
+
+#define LOG(A, ...) \
+    if (A <= LOG_LEVEL) \
+    { \
+        __android_log_print(ANDROID_LOG_DEBUG, "gles2n64", __VA_ARGS__); \
+    }
+
+#else
+
+#define LOG(A, ...)
+
+#endif
+
+#endif