refactor: Simplify custom GPU driver support check

- Removed `CheckKgslPresent()` from `SupportsCustomDriver()` function.
- Updated API level requirement to 30 for custom driver support.
- Simplified the `supportsCustomDriverLoading` JNI function to rely solely on API level check.
This commit is contained in:
Phoenix 2024-09-08 14:23:17 +10:00
parent 49b663087c
commit f20cd74ccf

View File

@ -510,17 +510,12 @@ void JNICALL Java_org_uzuy_uzuy_1emu_NativeLibrary_initializeGpuDriver(JNIEnv* e
}
[[maybe_unused]] bool SupportsCustomDriver() {
return android_get_device_api_level() >= 28 && CheckKgslPresent();
return android_get_device_api_level() >= 30; // && CheckKgslPresent();
}
jboolean JNICALL Java_org_uzuy_uzuy_1emu_utils_GpuDriverHelper_supportsCustomDriverLoading(
JNIEnv* env, jobject instance) {
#ifdef ARCHITECTURE_arm64
// If the KGSL device exists custom drivers can be loaded using adrenotools
return SupportsCustomDriver();
#else
return false;
#endif
}
jobjectArray Java_org_uzuy_uzuy_1emu_utils_GpuDriverHelper_getSystemDriverInfo(