PHYSFS_AndroidInit

Android-specific initialization details.

Header File

Defined in <physfs.h>

Syntax

typedef struct PHYSFS_AndroidInit
{
    void *jnienv;  /**< a valid JNIEnv * for the app. */
    void *context; /**< a valid Context * for the app. */
} PHYSFS_AndroidInit;

Remarks

This data is only used on Android. Other platforms can ignore this (and the struct will be preprocessed out too).

This struct must hold a valid JNIEnv * and a JNI object of a Context (either the application context or the current Activity is fine). Both are cast to a void * so we don't need jni.h included wherever physfs.h is.

This must be used with PHYSFS_init or various APIs, like PHYSFS_getBaseDir() and PHYSFS_getPrefDir(), will fail on Android.

See Also


CategoryAPI, CategoryAPIStruct, CategoryPhysicsFS