bump sgconnect and sgcore to v2.1.0-9080621 and add an almost functional android implementation
This commit is contained in:
@@ -35,17 +35,8 @@
|
||||
|
||||
#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 "SGAndroid/SGConnectJNI.h"
|
||||
#include "SGAndroid/SGCoreJNI.h"
|
||||
#include "SGLog/SGLog.h"
|
||||
|
||||
#define LOCTEXT_NAMESPACE "FSenseGloveAndroidModule"
|
||||
@@ -55,29 +46,14 @@ 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;
|
||||
}
|
||||
const int32 R1 = FSGConnectJNI::Initialize();
|
||||
const int32 R2 = FSGCoreJNI::Initialize();
|
||||
|
||||
FSGIC_JNIEnv_Ptr EnvContainer{Env};
|
||||
ensureAlwaysMsgf(R1 == 0,
|
||||
TEXT("Failed to initialize the SGConnect JNI bridge to SGConnect for Android! Status Code: %d"), R1);
|
||||
|
||||
/*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);
|
||||
ensureAlwaysMsgf(R2 == 0,
|
||||
TEXT("Failed to initialize the SGCore JNI bridge to SGConnect for Android! Status Code: %d"), R2);
|
||||
#endif /* PLATFORM_ANDROID */
|
||||
}
|
||||
|
||||
@@ -88,7 +64,7 @@ void FSenseGloveAndroidModule::PreUnloadCallback()
|
||||
|
||||
void FSenseGloveAndroidModule::PostLoadCallback()
|
||||
{
|
||||
SGLOG("Loading of SenseGloveAndroid module has succeeded!");
|
||||
SGLOG("Loading SenseGloveAndroid module has succeeded!");
|
||||
}
|
||||
|
||||
void FSenseGloveAndroidModule::ShutdownModule()
|
||||
|
||||
Reference in New Issue
Block a user