mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2025-01-07 00:26:04 +01:00
engine: platforms: android: platforms aren't expected to get NULL or zero sized native object names anymore
This commit is contained in:
parent
f1bc9b87b1
commit
e62ab51842
@ -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;
|
return (void *)jni.env;
|
||||||
}
|
|
||||||
else if( !strcasecmp( name, "JNIEnv" ) )
|
|
||||||
{
|
|
||||||
object = (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…
Reference in New Issue
Block a user