diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2023-09-25 20:02:08 +0200 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2023-09-25 20:02:08 +0200 |
commit | 0d9781dafdfda9569a2373216ace013663f0d858 (patch) | |
tree | 14ebcf10eb0e32a02190ce4c80363979f9f7216d /source/thirdparty/android.h | |
parent | e747b343c332907110dad26e15c20daf3d7d7125 (diff) | |
download | saw-0d9781dafdfda9569a2373216ace013663f0d858.zip |
Sokol and nanovg setup
Diffstat (limited to 'source/thirdparty/android.h')
-rw-r--r-- | source/thirdparty/android.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/source/thirdparty/android.h b/source/thirdparty/android.h new file mode 100644 index 0000000..0bf20ce --- /dev/null +++ b/source/thirdparty/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 |