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
misc: fix stuff up to make SDL example work again
it still behaves weirdly, should probably find some other example since I don't trust my own code.
This commit is contained in:
@@ -15,6 +15,11 @@ char *get_app_data_dir();
|
||||
JNIEXPORT jint JNICALL Java_android_content_res_AssetManager_openAsset(JNIEnv *env, jobject this, jstring _file_name, jint mode)
|
||||
{
|
||||
const char *file_name = _CSTRING(_file_name);
|
||||
|
||||
/* handle absolute paths */
|
||||
if(file_name[0] == '/')
|
||||
return open(file_name, O_CLOEXEC | O_RDWR);
|
||||
|
||||
char *app_data_dir = get_app_data_dir();
|
||||
char *path = malloc(strlen(app_data_dir) + strlen(ASSET_DIR) + strlen(file_name) + 1);
|
||||
int fd;
|
||||
|
||||
@@ -73,14 +73,6 @@ JNIEXPORT void JNICALL Java_android_content_res_AssetManager_setLocale
|
||||
JNIEXPORT jobjectArray JNICALL Java_android_content_res_AssetManager_getLocales
|
||||
(JNIEnv *, jobject);
|
||||
|
||||
/*
|
||||
* Class: android_content_res_AssetManager
|
||||
* Method: getResourcePackageName
|
||||
* Signature: (I)Ljava/lang/String;
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL Java_android_content_res_AssetManager_getResourcePackageName
|
||||
(JNIEnv *, jobject, jint);
|
||||
|
||||
/*
|
||||
* Class: android_content_res_AssetManager
|
||||
* Method: getResourceEntryName
|
||||
|
||||
Reference in New Issue
Block a user