try to offload android to sgcore/sgconnect third-party libraries and drop linux third-party libraries for earlier versions of the engine prior to 4.27
This commit is contained in:
@@ -35,6 +35,17 @@
|
||||
|
||||
#include "SenseGloveAndroidModule.h"
|
||||
|
||||
#if PLATFORM_ANDROID
|
||||
#include "Android/AndroidApplication.h"
|
||||
#include "Android/AndroidJava.h"
|
||||
#endif /* PLATFORM_ANDROID */
|
||||
|
||||
#if PLATFORM_ANDROID
|
||||
#include "SGConnectImpl/SGExportedFunctions.h"
|
||||
#include "SGCoreImpl/SGExportedFunctions.h"
|
||||
#include "SGInterop/SGIC_JNIEnv_Ptr.h"
|
||||
#endif /* PLATFORM_ANDROID */
|
||||
|
||||
#include "SGLog/SGLog.h"
|
||||
|
||||
#define LOCTEXT_NAMESPACE "FSenseGloveAndroidModule"
|
||||
@@ -42,6 +53,32 @@
|
||||
void FSenseGloveAndroidModule::StartupModule()
|
||||
{
|
||||
SGLOG("Starting up SenseGloveAndroid module...");
|
||||
|
||||
#if PLATFORM_ANDROID
|
||||
JNIEnv* Env = FAndroidApplication::GetJavaEnv();
|
||||
if (!Env)
|
||||
{
|
||||
SGLOG_ERROR("Failed to get the Android JNI environmnet!");
|
||||
return;
|
||||
}
|
||||
|
||||
FSGIC_JNIEnv_Ptr EnvContainer{Env};
|
||||
|
||||
/*ensureAlwaysMsgf(SGConnectImpl_Android_Initialize(&EnvContainer),
|
||||
TEXT("Failed to initialize the SGConnect JNI bridge to SGConnect for Android!"));
|
||||
|
||||
ensureAlwaysMsgf(SGCoreImpl_Android_Initialize(&EnvContainer),
|
||||
TEXT("Failed to initialize the SGCore JNI bridge to SGConnect for Android!"));*/
|
||||
|
||||
const int32 r1 = SGConnectImpl_Android_Initialize(&EnvContainer);
|
||||
const int32 r2 = SGCoreImpl_Android_Initialize(&EnvContainer);
|
||||
|
||||
ensureAlwaysMsgf(r1 == 0,
|
||||
TEXT("Failed to initialize the SGConnect JNI bridge to SGConnect for Android! Status Code: %d"), r1);
|
||||
|
||||
ensureAlwaysMsgf(r2 == 0,
|
||||
TEXT("Failed to initialize the SGCore JNI bridge to SGConnect for Android! Status Code: %d"), r1);
|
||||
#endif /* PLATFORM_ANDROID */
|
||||
}
|
||||
|
||||
void FSenseGloveAndroidModule::PreUnloadCallback()
|
||||
@@ -59,4 +96,4 @@ void FSenseGloveAndroidModule::ShutdownModule()
|
||||
SGLOG("Shutting down SenseGloveAndroid module...");
|
||||
}
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
Reference in New Issue
Block a user