diff options
Diffstat (limited to 'source/nanovg/android.h')
-rw-r--r-- | source/nanovg/android.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/source/nanovg/android.h b/source/nanovg/android.h new file mode 100644 index 0000000..0bf20ce --- /dev/null +++ b/source/nanovg/android.h @@ -0,0 +1,26 @@ +// See: http://www.50ply.com/blog/2013/01/19/loading-compressed-android-assets-with-file-pointer/ + +#ifndef NANOVG_ANDROID_H_04F2956C_D65D_11EA_852A_07298A1173F1 +#define NANOVG_ANDROID_H_04F2956C_D65D_11EA_852A_07298A1173F1 + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(__ANDROID__) + +#include <stdio.h> +#include <android/asset_manager.h> + +void android_fopen_set_asset_manager(AAssetManager* manager); +FILE* android_fopen(const char* fname, const char* mode); + +#define fopen(name, mode) android_fopen(name, mode) + +#endif + +#ifdef __cplusplus +} +#endif + +#endif // NANOVG_ANDROID_H_04F2956C_D65D_11EA_852A_07298A1173F1 |