mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2025-01-05 07:35:16 +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 )
|
||||
{
|
||||
static const char *availObjects[] = { "JNIEnv", "ActivityClass", NULL };
|
||||
void *object = NULL;
|
||||
|
||||
if( !name )
|
||||
if( !strcasecmp( name, "JNIEnv" ) )
|
||||
{
|
||||
object = (void *)availObjects;
|
||||
}
|
||||
else if( !strcasecmp( name, "JNIEnv" ) )
|
||||
{
|
||||
object = (void *)jni.env;
|
||||
return (void *)jni.env;
|
||||
}
|
||||
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