From 6e5600a9a5bd2fa2aafa577fd0b113d99ba5b2b4 Mon Sep 17 00:00:00 2001 From: Daniel-Genkin Date: Thu, 28 Oct 2021 10:26:14 -0400 Subject: [PATCH] Added another constructor to avoid requiring a full ANativeActivity --- include/assimp/port/AndroidJNI/AndroidJNIIOSystem.h | 2 ++ port/AndroidJNI/AndroidJNIIOSystem.cpp | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/include/assimp/port/AndroidJNI/AndroidJNIIOSystem.h b/include/assimp/port/AndroidJNI/AndroidJNIIOSystem.h index 01505d571..370327542 100644 --- a/include/assimp/port/AndroidJNI/AndroidJNIIOSystem.h +++ b/include/assimp/port/AndroidJNI/AndroidJNIIOSystem.h @@ -65,6 +65,8 @@ public: /** Constructor. */ AndroidJNIIOSystem(ANativeActivity* activity); + AndroidJNIIOSystem(const char *internalPath, AAssetManager assetManager); + /** Destructor. */ ~AndroidJNIIOSystem(); diff --git a/port/AndroidJNI/AndroidJNIIOSystem.cpp b/port/AndroidJNI/AndroidJNIIOSystem.cpp index db499a20b..bed40ce51 100644 --- a/port/AndroidJNI/AndroidJNIIOSystem.cpp +++ b/port/AndroidJNI/AndroidJNIIOSystem.cpp @@ -67,6 +67,12 @@ AndroidJNIIOSystem::AndroidJNIIOSystem(ANativeActivity* activity) AndroidActivityInit(activity); } +AndroidJNIIOSystem::AndroidJNIIOSystem(const char *internalPath, AAssetManager assetManager) +{ + mApkWorkspacePath = internalDataPath; + mApkAssetManager = assetManager; +} + // ------------------------------------------------------------------------------------------------ // Destructor. AndroidJNIIOSystem::~AndroidJNIIOSystem()