From f5c4671bfbad96bf346bd7e9a21fc4317b4959df Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Sat, 3 Dec 2022 17:00:20 +0530 Subject: Adds most of the tools --- v_windows/v/old/thirdparty/sokol/sokol_v.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 v_windows/v/old/thirdparty/sokol/sokol_v.h (limited to 'v_windows/v/old/thirdparty/sokol/sokol_v.h') diff --git a/v_windows/v/old/thirdparty/sokol/sokol_v.h b/v_windows/v/old/thirdparty/sokol/sokol_v.h new file mode 100644 index 0000000..cc08678 --- /dev/null +++ b/v_windows/v/old/thirdparty/sokol/sokol_v.h @@ -0,0 +1,20 @@ +#if defined(__ANDROID__) + // Adapted from https://stackoverflow.com/a/196018/1904615 + #define V_ANDROID_LOG_STR_VALUE(arg) #arg + #define V_ANDROID_LOG_NAME(tag_name) V_ANDROID_LOG_STR_VALUE(tag_name) + + #ifndef V_ANDROID_LOG_TAG + #if defined(APPNAME) + #define V_ANDROID_LOG_TAG APPNAME + #else + #define V_ANDROID_LOG_TAG "V_ANDROID" + #endif + #endif + + #define V_ANDROID_LOG_TAG_NAME V_ANDROID_LOG_NAME(V_ANDROID_LOG_TAG) + + #include + #define printf(...) __android_log_print(ANDROID_LOG_INFO, V_ANDROID_LOG_TAG_NAME, __VA_ARGS__) + #define fprintf(a, ...) __android_log_print(ANDROID_LOG_ERROR, V_ANDROID_LOG_TAG_NAME, __VA_ARGS__) +#endif + -- cgit v1.2.3