Support Android (#59)

This commit is contained in:
Fangjun Kuang
2023-02-24 13:57:03 +08:00
committed by GitHub
parent 5a5d029490
commit 9064b3f016
68 changed files with 1469 additions and 220 deletions

View File

@@ -141,9 +141,8 @@ std::vector<char> ReadFile(AAssetManager *mgr, const std::string &filename) {
auto p = reinterpret_cast<const char *>(AAsset_getBuffer(asset));
size_t asset_length = AAsset_getLength(asset);
AAsset_close(asset);
std::vector<char> buffer(p, p + asset_length);
AAsset_close(asset);
return buffer;
}