mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Added option to specify Android asset reading mode.
This commit is contained in:
parent
ba4948fd97
commit
9f01876102
4 changed files with 17 additions and 3 deletions
|
@ -3286,6 +3286,11 @@ IF_NO_GC(
|
|||
}
|
||||
|
||||
+ (AAsset *)assetForPath:(NSString *)path
|
||||
{
|
||||
return [self assetForPath:path withMode:AASSET_MODE_UNKNOWN];
|
||||
}
|
||||
|
||||
+ (AAsset *)assetForPath:(NSString *)path withMode:(int)mode
|
||||
{
|
||||
AAsset *asset = NULL;
|
||||
|
||||
|
@ -3298,7 +3303,7 @@ IF_NO_GC(
|
|||
NSString *assetPath = [path substringFromIndex:[resourcePath length]+1];
|
||||
|
||||
asset = AAssetManager_open(_assetManager,
|
||||
[assetPath fileSystemRepresentation], AASSET_MODE_BUFFER);
|
||||
[assetPath fileSystemRepresentation], mode);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue