feat: updated engine version to 4.4-rc1
This commit is contained in:
parent
ee00efde1f
commit
21ba8e33af
5459 changed files with 1128836 additions and 198305 deletions
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include <openxr/openxr.h>
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <android/log.h>
|
||||
|
|
@ -82,7 +83,6 @@ static Uri makeContentUri(bool systemBroker, int majorVersion, const char *abi)
|
|||
.appendPath(abi)
|
||||
.appendPath(RUNTIMES_PATH)
|
||||
.appendPath(TABLE_PATH);
|
||||
ContentUris::appendId(builder, 0);
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
|
|
@ -175,7 +175,6 @@ static inline jni::Array<std::string> makeArray(std::initializer_list<const char
|
|||
}
|
||||
return ret;
|
||||
}
|
||||
static constexpr auto TAG = "OpenXR-Loader";
|
||||
|
||||
#if defined(__arm__)
|
||||
static constexpr auto ABI = "armeabi-v7l";
|
||||
|
|
@ -313,26 +312,41 @@ int getActiveRuntimeVirtualManifest(wrap::android::content::Context const &conte
|
|||
|
||||
cursor.moveToFirst();
|
||||
|
||||
auto filename = cursor.getString(cursor.getColumnIndex(active_runtime::Columns::SO_FILENAME));
|
||||
auto libDir = cursor.getString(cursor.getColumnIndex(active_runtime::Columns::NATIVE_LIB_DIR));
|
||||
auto packageName = cursor.getString(cursor.getColumnIndex(active_runtime::Columns::PACKAGE_NAME));
|
||||
do {
|
||||
auto filename = cursor.getString(cursor.getColumnIndex(active_runtime::Columns::SO_FILENAME));
|
||||
auto libDir = cursor.getString(cursor.getColumnIndex(active_runtime::Columns::NATIVE_LIB_DIR));
|
||||
auto packageName = cursor.getString(cursor.getColumnIndex(active_runtime::Columns::PACKAGE_NAME));
|
||||
|
||||
auto hasFunctions = cursor.getInt(cursor.getColumnIndex(active_runtime::Columns::HAS_FUNCTIONS)) == 1;
|
||||
__android_log_print(ANDROID_LOG_INFO, TAG, "Got runtime: package: %s, so filename: %s, native lib dir: %s, has functions: %s",
|
||||
packageName.c_str(), filename.c_str(), libDir.c_str(), (hasFunctions ? "yes" : "no"));
|
||||
auto hasFunctions = cursor.getInt(cursor.getColumnIndex(active_runtime::Columns::HAS_FUNCTIONS)) == 1;
|
||||
ALOGI("Got runtime: package: %s, so filename: %s, native lib dir: %s, has functions: %s", packageName.c_str(),
|
||||
filename.c_str(), libDir.c_str(), (hasFunctions ? "yes" : "no"));
|
||||
|
||||
auto lib_path = libDir + "/" + filename;
|
||||
cursor.close();
|
||||
auto lib_path = libDir + "/" + filename;
|
||||
auto *lib = dlopen(lib_path.c_str(), RTLD_LAZY | RTLD_LOCAL);
|
||||
if (lib) {
|
||||
// we found a runtime that we can dlopen, use it.
|
||||
dlclose(lib);
|
||||
|
||||
JsonManifestBuilder builder{"runtime", lib_path};
|
||||
if (hasFunctions) {
|
||||
int result = populateFunctions(context, systemBroker, packageName, builder);
|
||||
if (result != 0) {
|
||||
return result;
|
||||
JsonManifestBuilder builder{"runtime", lib_path};
|
||||
if (hasFunctions) {
|
||||
int result = populateFunctions(context, systemBroker, packageName, builder);
|
||||
if (result != 0) {
|
||||
ALOGW("Unable to populate functions from runtime: %s, checking for more records...", lib_path.c_str());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
virtualManifest = builder.build();
|
||||
cursor.close();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
virtualManifest = builder.build();
|
||||
return 0;
|
||||
// this runtime was not accessible, see if the broker has more runtimes on
|
||||
// offer.
|
||||
ALOGV("Unable to open broker provided runtime at %s, checking for more records...", lib_path.c_str());
|
||||
} while (cursor.moveToNext());
|
||||
|
||||
ALOGE("Unable to open any of the broker provided runtimes.");
|
||||
cursor.close();
|
||||
return -1;
|
||||
}
|
||||
} // namespace openxr_android
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue