We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not an issue. I haz fixes;
sokol_fetch.h POSIX section. no other changes needed.
sokol_fetch.h
#if _SFETCH_PLATFORM_POSIX // XXX VOIDWARE #ifdef __ANDROID__ _SOKOL_PRIVATE int android_read(void* a, char* buf, int size) { return AAsset_read((AAsset*)a, buf, size); } _SOKOL_PRIVATE int android_write(void* a, const char* buf, int size) { return EACCES; // can't provide write access to the apk } _SOKOL_PRIVATE fpos_t android_seek(void* a, fpos_t offset, int whence) { return AAsset_seek((AAsset*)a, offset, whence); } _SOKOL_PRIVATE int android_close(void* a) { AAsset_close((AAsset*)a); return 0; } _SOKOL_PRIVATE _sfetch_file_handle_t _sfetch_file_open(const _sfetch_path_t* path) { _sfetch_file_handle_t h = _SFETCH_INVALID_FILE_HANDLE; auto act = (ANativeActivity*)sapp_android_get_native_activity(); auto a = AAssetManager_open(act->assetManager, path->buf, 0); if (a) { h = funopen(a, android_read, android_write, android_seek, android_close); } return h; } #else _SOKOL_PRIVATE _sfetch_file_handle_t _sfetch_file_open(const _sfetch_path_t* path) { return fopen(path->buf, "rb"); } #endif // __ANDROID__
You can pay me later ! :)
The text was updated successfully, but these errors were encountered:
floooh
No branches or pull requests
Not an issue. I haz fixes;
sokol_fetch.h
POSIX section. no other changes needed.You can pay me later ! :)
The text was updated successfully, but these errors were encountered: