Browse Source

engine: platforms: android: platforms aren't expected to get NULL or zero sized native object names anymore

master
Alibek Omarov 1 year ago
parent
commit
e62ab51842
  1. 15
      engine/platform/android/android.c

15
engine/platform/android/android.c

@ -61,23 +61,16 @@ Android_GetNativeObject
void *Android_GetNativeObject( const char *name ) void *Android_GetNativeObject( const char *name )
{ {
static const char *availObjects[] = { "JNIEnv", "ActivityClass", NULL }; if( !strcasecmp( name, "JNIEnv" ) )
void *object = NULL;
if( !name )
{
object = (void *)availObjects;
}
else if( !strcasecmp( name, "JNIEnv" ) )
{ {
object = (void *)jni.env; return (void *)jni.env;
} }
else if( !strcasecmp( name, "ActivityClass" ) ) else if( !strcasecmp( name, "ActivityClass" ) )
{ {
object = (void *)jni.actcls; return (void *)jni.actcls;
} }
return object; return NULL;
} }
/* /*

Loading…
Cancel
Save