You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
get rid of launcher script requirement; fix app data dir being hardcoded; update documentation; remove prebuilt dalvik (NOTE - purged from history at this point, so is not part of the diff)
This commit is contained in:
@@ -18,14 +18,16 @@ typedef int64_t off64_t;
|
||||
typedef void JNIEnv;
|
||||
typedef void * jobject;
|
||||
|
||||
#define ASSET_DIR "data/assets/"
|
||||
#define ASSET_DIR "assets/"
|
||||
char *get_app_data_dir();
|
||||
|
||||
struct AAsset* AAssetManager_open(struct AAssetManager *amgr, const char *file_name, int mode)
|
||||
{
|
||||
char *path = malloc(strlen(file_name) + strlen(ASSET_DIR) + 1);
|
||||
char *app_data_dir = get_app_data_dir();
|
||||
char *path = malloc(strlen(app_data_dir) + strlen(ASSET_DIR) + strlen(file_name) + 1);
|
||||
int fd;
|
||||
|
||||
strcpy(path, ASSET_DIR);
|
||||
strcpy(path, app_data_dir);
|
||||
strcat(path, ASSET_DIR);
|
||||
strcat(path, file_name);
|
||||
|
||||
printf("openning asset with filename: %s\n", file_name);
|
||||
|
||||
Reference in New Issue
Block a user