mirror of
https://github.com/yurisieucuti/treble_evolution.git
synced 2024-11-24 12:06:19 +00:00
41 lines
1.5 KiB
Diff
41 lines
1.5 KiB
Diff
From 2231baf29ca3ff0134a32c5a3e4b642ebb8d9da4 Mon Sep 17 00:00:00 2001
|
|
From: Pierre-Hugues Husson <phh@phh.me>
|
|
Date: Wed, 20 Dec 2023 09:48:04 -0500
|
|
Subject: [PATCH 10/11] Fix loading unnamed GLES
|
|
|
|
Normally Android loads libGLES_${ro.hardware.egl}.so
|
|
But up to Android 14, it was allowed not to set ro.hardware.egl
|
|
In which case, Android would just load whatever libGLES_xxxx.so
|
|
|
|
Android 14.0 did it more finely, and would fallback only when
|
|
ro.hardware.egl is not set, which was still fine for older platforms.
|
|
Android 14.1 broke it by refusing the fallback when ro.board.platform is
|
|
set (which often is)
|
|
|
|
Simply allow the fallback in all cases.
|
|
|
|
Test:
|
|
- Blackview BV9800 Pro fails to boot without this patch
|
|
- It does boot with it
|
|
---
|
|
opengl/libs/EGL/Loader.cpp | 3 +--
|
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
|
|
diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp
|
|
index 654e5b7c03..55f59e2a17 100644
|
|
--- a/opengl/libs/EGL/Loader.cpp
|
|
+++ b/opengl/libs/EGL/Loader.cpp
|
|
@@ -298,8 +298,7 @@ void* Loader::open(egl_connection_t* cnx) {
|
|
hnd = attempt_to_load_system_driver(cnx, nullptr, true);
|
|
}
|
|
|
|
- if (!hnd && !failToLoadFromDriverSuffixProperty &&
|
|
- property_get_int32("ro.vendor.api_level", 0) < __ANDROID_API_U__) {
|
|
+ if (!hnd) {
|
|
// Still can't find the graphics drivers with the exact name. This time try to use wildcard
|
|
// matching if the device is launched before Android 14.
|
|
hnd = attempt_to_load_system_driver(cnx, nullptr, false);
|
|
--
|
|
2.25.1
|
|
|