From c594f1ec2410405703af5d16d8bebca8c7badd96 Mon Sep 17 00:00:00 2001 From: Mamadou Babaei Date: Fri, 24 Jan 2025 12:21:25 +0100 Subject: [PATCH] add FSGConnectJNI::Initialize() and FSGCoreJNI::Initialize() return codes to Android logs for detailed debugging purposes through adb logcat --- Handbook/src/appendix/changelog.md | 1 + Source/SenseGloveAndroid/Private/SenseGloveAndroidModule.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Handbook/src/appendix/changelog.md b/Handbook/src/appendix/changelog.md index 183568b0..249ef4ad 100644 --- a/Handbook/src/appendix/changelog.md +++ b/Handbook/src/appendix/changelog.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Added an ePub version of the SenseGlove Unreal Engine Handbook. +- Added `FSGConnectJNI::Initialize()` and `FSGCoreJNI::Initialize()` return codes to Android logs for detailed debugging purposes through `adb logcat`. ### Fixed diff --git a/Source/SenseGloveAndroid/Private/SenseGloveAndroidModule.cpp b/Source/SenseGloveAndroid/Private/SenseGloveAndroidModule.cpp index 3efee17b..f126d5db 100644 --- a/Source/SenseGloveAndroid/Private/SenseGloveAndroidModule.cpp +++ b/Source/SenseGloveAndroid/Private/SenseGloveAndroidModule.cpp @@ -76,6 +76,9 @@ void FSenseGloveAndroidModule::OnPostEngineInit() const const int32 R1 = FSGConnectJNI::Initialize(); const int32 R2 = FSGCoreJNI::Initialize(); + SGLOG("FSGConnectJNI::Initialize() return code", R1); + SGLOG("FSGCoreJNI::Initialize() return code", R2); + ensureAlwaysMsgf(R1 == 0, TEXT( "Failed to initialize the SGConnect JNI bridge to SGConnect for Android! Status Code: %d"