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:
Mis012
2022-10-12 17:23:19 +02:00
parent 31cf1a521b
commit 49961186a2
17 changed files with 989 additions and 899 deletions

View File

@@ -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);