From 8b70447b835fa7cd83e0bdb681c17b8afaf4d68e Mon Sep 17 00:00:00 2001 From: Vera-Firefly <1964762970@qq.com> Date: Thu, 14 Nov 2024 02:38:43 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84[=E6=A1=A5=E6=8E=A5]:=20?= =?UTF-8?q?=E9=87=8D=E6=9E=84=E5=8E=9F=E6=9D=A5=E7=9A=84=E5=A4=87=E7=94=A8?= =?UTF-8?q?=E6=A1=A5=E6=8E=A5=E6=96=B9=E6=A1=88,=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=96=B0=E7=9A=84=E9=80=89=E6=8B=A9=E6=96=B9=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../net/kdt/pojavlaunch/MainActivity.java | 23 +-- .../main/java/net/kdt/pojavlaunch/Tools.java | 36 +++++ .../prefs/LauncherPreferences.java | 4 +- .../LauncherPreferenceVideoFragment.java | 32 +++- .../net/kdt/pojavlaunch/utils/JREUtils.java | 5 +- app_pojavlauncher/src/main/jni/Android.mk | 3 +- .../src/main/jni/ctxbridges/bridge_tbl.h | 11 ++ .../src/main/jni/ctxbridges/gl_bridge.c | 4 +- .../{spare_osm_bridge.c => osm_bridge_xxx1.c} | 86 ++++------ .../src/main/jni/ctxbridges/osm_bridge_xxx1.h | 29 ++++ .../src/main/jni/ctxbridges/osm_bridge_xxx2.c | 112 +++++++++++++ .../src/main/jni/ctxbridges/osm_bridge_xxx2.h | 19 +++ .../src/main/jni/ctxbridges/osmesa_loader.c | 5 +- .../src/main/jni/ctxbridges/renderer_config.h | 26 ++- .../src/main/jni/ctxbridges/spare_bridge.h | 47 ------ .../main/jni/ctxbridges/spare_osm_bridge.h | 29 ---- .../jni/ctxbridges/spare_renderer_config.h | 19 --- .../src/main/jni/ctxbridges/virgl_bridge.c | 1 - app_pojavlauncher/src/main/jni/egl_bridge.c | 153 +++++++++++++----- .../src/main/jni/environ/environ.h | 1 + .../src/main/res/values-ar/pgw_strings.xml | 2 - .../main/res/values-az-rAZ/pgw_strings.xml | 2 - .../src/main/res/values-cs/pgw_strings.xml | 2 - .../src/main/res/values-de/pgw_strings.xml | 2 - .../src/main/res/values-el/pgw_strings.xml | 2 - .../main/res/values-en-rGB/pgw_strings.xml | 2 - .../main/res/values-en-rPS/pgw_strings.xml | 2 - .../src/main/res/values-es/pgw_strings.xml | 2 - .../main/res/values-et-rEE/pgw_strings.xml | 2 - .../main/res/values-fa-rIR/pgw_strings.xml | 2 - .../src/main/res/values-fil/pgw_strings.xml | 2 - .../src/main/res/values-fr/pgw_strings.xml | 2 - .../src/main/res/values-in/pgw_strings.xml | 2 - .../src/main/res/values-it/pgw_strings.xml | 2 - .../src/main/res/values-iw/pgw_strings.xml | 2 - .../src/main/res/values-ja/pgw_strings.xml | 2 - .../src/main/res/values-ko/pgw_strings.xml | 2 - .../src/main/res/values-lt/pgw_strings.xml | 2 - .../src/main/res/values-uk/pgw_strings.xml | 2 - .../src/main/res/values-vi/pgw_strings.xml | 2 - .../main/res/values-zh-rCN/pgw_strings.xml | 3 +- .../main/res/values-zh-rTW/pgw_strings.xml | 3 +- .../src/main/res/values/headings_array.xml | 26 +-- .../src/main/res/values/pgw_strings.xml | 3 +- .../src/main/res/values/renderer_extra.xml | 16 ++ .../src/main/res/xml/pref_video.xml | 9 +- 46 files changed, 464 insertions(+), 281 deletions(-) rename app_pojavlauncher/src/main/jni/ctxbridges/{spare_osm_bridge.c => osm_bridge_xxx1.c} (69%) create mode 100644 app_pojavlauncher/src/main/jni/ctxbridges/osm_bridge_xxx1.h create mode 100644 app_pojavlauncher/src/main/jni/ctxbridges/osm_bridge_xxx2.c create mode 100644 app_pojavlauncher/src/main/jni/ctxbridges/osm_bridge_xxx2.h delete mode 100644 app_pojavlauncher/src/main/jni/ctxbridges/spare_bridge.h delete mode 100644 app_pojavlauncher/src/main/jni/ctxbridges/spare_osm_bridge.h delete mode 100644 app_pojavlauncher/src/main/jni/ctxbridges/spare_renderer_config.h diff --git a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/MainActivity.java b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/MainActivity.java index 4f2abee7a..4f9e8bc49 100644 --- a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/MainActivity.java +++ b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/MainActivity.java @@ -380,21 +380,24 @@ public static boolean isAndroid8OrHigher() { } private void runCraft(String versionId, JMinecraftVersionList.Version version) throws Throwable { - if (Tools.LOCAL_RENDERER == null) { + if (Tools.LOCAL_RENDERER == null) Tools.LOCAL_RENDERER = LauncherPreferences.PREF_RENDERER; - } - if (Tools.MESA_LIBS == null) { + + if (Tools.MESA_LIBS == null) Tools.MESA_LIBS = LauncherPreferences.PREF_MESA_LIB; - } - if (Tools.DRIVER_MODEL == null) { + + if (Tools.DRIVER_MODEL == null) Tools.DRIVER_MODEL = LauncherPreferences.PREF_DRIVER_MODEL; - } - if (Tools.LOADER_OVERRIDE == null) { + + if (Tools.LOADER_OVERRIDE == null) Tools.LOADER_OVERRIDE = LauncherPreferences.PREF_LOCAL_LOADER_OVERRIDE; - } - if (Tools.TURNIP_LIBS == null) { + + if (Tools.TURNIP_LIBS == null) Tools.TURNIP_LIBS = LauncherPreferences.PREF_TURNIP_LIBS; - } + + if (Tools.CONFIG_BRIDGE == null) + Tools.CONFIG_BRIDGE = LauncherPreferences.PREF_CONFIG_BRIDGE; + if (!Tools.checkRendererCompatible(this, Tools.LOCAL_RENDERER)) { Tools.RenderersList renderersList = Tools.getCompatibleRenderers(this); String firstCompatibleRenderer = renderersList.rendererIds.get(0); diff --git a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/Tools.java b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/Tools.java index c1269fad5..c74e4c424 100644 --- a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/Tools.java +++ b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/Tools.java @@ -116,6 +116,7 @@ public final class Tools { public static File FILE_PROFILE_PATH; public static String MULTIRT_HOME; public static String LOCAL_RENDERER = null; + public static String CONFIG_BRIDGE; public static int DEVICE_ARCHITECTURE; public static final String LAUNCHERPROFILES_RTPREFIX = "pojav://"; @@ -140,6 +141,7 @@ public final class Tools { private static CMesaLDOList sCompatibleCMesaLDO; private static CTurnipDriverList sCompatibleCTurnipDriver; private static RenderersList sCompatibleRenderers; + private static ConfigBridgeList sCompatibleConfigBridge; private static File getPojavStorageRoot(Context ctx) { if (SDK_INT >= 29) { @@ -1275,6 +1277,40 @@ public static void releaseRenderersCache() { System.gc(); } + public static class ConfigBridgeList implements IListAndArry { + public final List configIds; + public final String[] configNames; + + public ConfigBridgeList(List configIds, String[] configNames) { + this.configIds = configIds; + this.configNames = configNames; + } + + @Override + public List getList() { + return configIds; + } + + @Override + public String[] getArray() { + return configNames; + } + } + + public static ConfigBridgeList getCompatibleConfigBridge(Context context) { + Resources resources = context.getResources(); + String[] defaultIds = resources.getStringArray(R.array.config_bridge_values); + String[] defaultNames = resources.getStringArray(R.array.config_bridge_names); + List Ids = new ArrayList<>(defaultIds.length); + List Names = new ArrayList<>(defaultNames.length); + for (int i = 0; i < defaultIds.length; i++) { + Ids.add(defaultIds[i]); + Names.add(defaultNames[i]); + } + sCompatibleConfigBridge = new ConfigBridgeList(Ids, Names.toArray(new String[0])); + return sCompatibleConfigBridge; + } + public static class CMesaLibList implements IListAndArry { public final List CMesaLibIds; public final String[] CMesaLibs; diff --git a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/prefs/LauncherPreferences.java b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/prefs/LauncherPreferences.java index 669e5a257..507029a1b 100644 --- a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/prefs/LauncherPreferences.java +++ b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/prefs/LauncherPreferences.java @@ -28,6 +28,7 @@ public class LauncherPreferences { public static String PREF_MESA_LIB = "default"; public static String PREF_TURNIP_LIBS = "default"; public static String PREF_DRIVER_MODEL = "driver_zink"; + public static String PREF_CONFIG_BRIDGE = "default"; public static String PREF_LOCAL_LOADER_OVERRIDE = "kgsl"; public static boolean PREF_VERTYPE_RELEASE = true; @@ -74,7 +75,6 @@ public class LauncherPreferences { public static boolean PREF_EXP_SETUP = false; - public static boolean PREF_SPARE_BRIDGE = false; public static boolean PREF_SPARE_FRAME_BUFFER = false; public static boolean PREF_EXP_ENABLE_SYSTEM = true; public static boolean PREF_EXP_ENABLE_SPECIFIC = false; @@ -140,7 +140,7 @@ public static void loadPreferences(Context ctx) { PREF_SKIP_NOTIFICATION_PERMISSION_CHECK = DEFAULT_PREF.getBoolean(PREF_KEY_SKIP_NOTIFICATION_CHECK, false); PREF_VSYNC_IN_ZINK = DEFAULT_PREF.getBoolean("vsync_in_zink", true); - PREF_SPARE_BRIDGE = DEFAULT_PREF.getBoolean("spareBridge", false); + PREF_CONFIG_BRIDGE = DEFAULT_PREF.getString("configBridge", "default"); PREF_SPARE_FRAME_BUFFER = DEFAULT_PREF.getBoolean("SpareFrameBuffer", false); PREF_EXP_ENABLE_SYSTEM = DEFAULT_PREF.getBoolean("ebSystem", true); PREF_EXP_ENABLE_SPECIFIC = DEFAULT_PREF.getBoolean("ebSpecific", false); diff --git a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/prefs/screens/LauncherPreferenceVideoFragment.java b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/prefs/screens/LauncherPreferenceVideoFragment.java index 5ff2fc878..4aed96e1c 100644 --- a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/prefs/screens/LauncherPreferenceVideoFragment.java +++ b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/prefs/screens/LauncherPreferenceVideoFragment.java @@ -107,12 +107,14 @@ public void onCreatePreferences(Bundle b, String str) { }); final ListPreference rendererListPref = requirePreference("renderer", ListPreference.class); + final ListPreference configBridgePref = requirePreference("configBridge", ListPreference.class); final ChooseMesaListPref CMesaLibP = requirePreference("CMesaLibrary", ChooseMesaListPref.class); final ChooseTurnipListPref CTurnipP = requirePreference("chooseTurnipDriver", ChooseTurnipListPref.class); final ListPreference CDriverModelP = requirePreference("CDriverModels", ListPreference.class); final ListPreference CMesaLDOP = requirePreference("ChooseMldo", ListPreference.class); setListPreference(rendererListPref, "renderer"); + setListPreference(configBridgePref, "configBridge"); setListPreference(CMesaLibP, "CMesaLibrary"); setListPreference(CTurnipP, "chooseTurnipDriver"); setListPreference(CDriverModelP, "CDriverModels"); @@ -123,6 +125,11 @@ public void onCreatePreferences(Bundle b, String str) { return true; }); + configBridgePref.setOnPreferenceChangeListener((pre, obj) -> { + Tools.CONFIG_BRIDGE = (String) obj; + return true; + }); + CMesaLibP.setOnPreferenceChangeListener((pre, obj) -> { Tools.MESA_LIBS = (String) obj; setListPreference(CDriverModelP, "CDriverModels"); @@ -273,16 +280,29 @@ private void setListPreference(ListPreference listPreference, String preferenceK listPreference.setValue(value); } Tools.MESA_LIBS = value; - } else if (preferenceKey.equals("CDriverModels")) { + } + + if (preferenceKey.equals("renderer")) { + array = Tools.getCompatibleRenderers(getContext()); + Tools.LOCAL_RENDERER = value; + } + + if (preferenceKey.equals("configBridge")) { + array = Tools.getCompatibleConfigBridge(getContext()); + Tools.CONFIG_BRIDGE = value; + } + + if (preferenceKey.equals("CDriverModels")) { array = Tools.getCompatibleCDriverModel(getContext()); Tools.DRIVER_MODEL = value; - } else if (preferenceKey.equals("ChooseMldo")) { + } + + if (preferenceKey.equals("ChooseMldo")) { array = Tools.getCompatibleCMesaLDO(getContext()); Tools.LOADER_OVERRIDE = value; - } else if (preferenceKey.equals("renderer")) { - array = Tools.getCompatibleRenderers(getContext()); - Tools.LOCAL_RENDERER = value; - } else if (preferenceKey.equals("chooseTurnipDriver")) { + } + + if (preferenceKey.equals("chooseTurnipDriver")) { array = Tools.getCompatibleCTurnipDriver(getContext()); Tools.TURNIP_LIBS = value; } diff --git a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/utils/JREUtils.java b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/utils/JREUtils.java index ee774dd21..963b32af2 100644 --- a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/utils/JREUtils.java +++ b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/utils/JREUtils.java @@ -2,6 +2,7 @@ import static net.kdt.pojavlaunch.Architecture.ARCH_X86; import static net.kdt.pojavlaunch.Architecture.is64BitsDevice; +import static net.kdt.pojavlaunch.Tools.CONFIG_BRIDGE; import static net.kdt.pojavlaunch.Tools.DRIVER_MODEL; import static net.kdt.pojavlaunch.Tools.LOADER_OVERRIDE; import static net.kdt.pojavlaunch.Tools.LOCAL_RENDERER; @@ -211,6 +212,8 @@ private static void setJavaEnv(String jreHome) throws Throwable { envMap.put("AWTSTUB_WIDTH", Integer.toString(CallbackBridge.windowWidth > 0 ? CallbackBridge.windowWidth : CallbackBridge.physicalWidth)); envMap.put("AWTSTUB_HEIGHT", Integer.toString(CallbackBridge.windowHeight > 0 ? CallbackBridge.windowHeight : CallbackBridge.physicalHeight)); + if (Tools.CONFIG_BRIDGE != null) + envMap.put("POJAV_CONFIG_BRIDGE", Tools.CONFIG_BRIDGE); if (PREF_BIG_CORE_AFFINITY) envMap.put("POJAV_BIG_CORE_AFFINITY", "1"); if (PREF_DUMP_SHADERS) @@ -221,8 +224,6 @@ private static void setJavaEnv(String jreHome) throws Throwable { envMap.put("POJAV_VSYNC_IN_ZINK", "1"); if (PREF_EXP_SETUP) envMap.put("POJAV_EXP_SETUP", "1"); - if (PREF_SPARE_BRIDGE) - envMap.put("POJAV_SPARE_BRIDGE", "1"); if (PREF_SPARE_FRAME_BUFFER) envMap.put("POJAV_SPARE_FRAME_BUFFER", "1"); if (FIX_Q3_BEHAVIOR) diff --git a/app_pojavlauncher/src/main/jni/Android.mk b/app_pojavlauncher/src/main/jni/Android.mk index 27fbd0c4e..357ec6445 100644 --- a/app_pojavlauncher/src/main/jni/Android.mk +++ b/app_pojavlauncher/src/main/jni/Android.mk @@ -26,7 +26,8 @@ LOCAL_SRC_FILES := \ egl_bridge.c \ ctxbridges/gl_bridge.c \ ctxbridges/osm_bridge.c \ - ctxbridges/spare_osm_bridge.c \ + ctxbridges/osm_bridge_xxx1.c \ + ctxbridges/osm_bridge_xxx2.c \ ctxbridges/egl_loader.c \ ctxbridges/osmesa_loader.c \ ctxbridges/swap_interval_no_egl.c \ diff --git a/app_pojavlauncher/src/main/jni/ctxbridges/bridge_tbl.h b/app_pojavlauncher/src/main/jni/ctxbridges/bridge_tbl.h index 1683bc1ef..cc413693f 100644 --- a/app_pojavlauncher/src/main/jni/ctxbridges/bridge_tbl.h +++ b/app_pojavlauncher/src/main/jni/ctxbridges/bridge_tbl.h @@ -8,6 +8,7 @@ #include #include #include +#include typedef basic_render_window_t* (*br_init_context_t)(basic_render_window_t* share); typedef void (*br_make_current_t)(basic_render_window_t* bundle); @@ -32,6 +33,16 @@ void set_osm_bridge_tbl() { br_swap_interval = osm_swap_interval; } +void osm_bridge_xxx1() { + br_init = xxx1_osm_init; + br_init_context = (br_init_context_t) xxx1_osm_init_context; + br_make_current = (br_make_current_t) xxx1_osm_make_current; + br_get_current = (br_get_current_t) xxx1_osm_get_current; + br_swap_buffers = xxx1_osm_swap_buffers; + br_setup_window = xxx1_osm_setup_window; + br_swap_interval = xxx1_osm_swap_interval; +} + void set_gl_bridge_tbl() { br_init = gl_init; br_init_context = (br_init_context_t) gl_init_context; diff --git a/app_pojavlauncher/src/main/jni/ctxbridges/gl_bridge.c b/app_pojavlauncher/src/main/jni/ctxbridges/gl_bridge.c index cdde99bde..c19767a29 100644 --- a/app_pojavlauncher/src/main/jni/ctxbridges/gl_bridge.c +++ b/app_pojavlauncher/src/main/jni/ctxbridges/gl_bridge.c @@ -113,7 +113,7 @@ void gl_make_current(gl_render_window_t* bundle) { } bool hasSetMainWindow = false; if(pojav_environ->mainWindowBundle == NULL) { - if(getenv("POJAV_SPARE_BRIDGE") != NULL) { + if(getenv("POJAV_CONFIG_BRIDGE") != NULL) { pojav_environ->mainWindowBundle = bundle; } else { pojav_environ->mainWindowBundle = (basic_render_window_t*)bundle; @@ -131,7 +131,7 @@ void gl_make_current(gl_render_window_t* bundle) { }else { if(hasSetMainWindow) { pojav_environ->mainWindowBundle->newNativeSurface = NULL; - if(getenv("POJAV_SPARE_BRIDGE") != NULL) { + if(getenv("POJAV_CONFIG_BRIDGE") != NULL) { gl_swap_surface(pojav_environ->mainWindowBundle); } else { gl_swap_surface((gl_render_window_t*)pojav_environ->mainWindowBundle); diff --git a/app_pojavlauncher/src/main/jni/ctxbridges/spare_osm_bridge.c b/app_pojavlauncher/src/main/jni/ctxbridges/osm_bridge_xxx1.c similarity index 69% rename from app_pojavlauncher/src/main/jni/ctxbridges/spare_osm_bridge.c rename to app_pojavlauncher/src/main/jni/ctxbridges/osm_bridge_xxx1.c index e3b282448..4d823350f 100644 --- a/app_pojavlauncher/src/main/jni/ctxbridges/spare_osm_bridge.c +++ b/app_pojavlauncher/src/main/jni/ctxbridges/osm_bridge_xxx1.c @@ -6,41 +6,41 @@ #include #include #include -#include "spare_osm_bridge.h" -#include "spare_renderer_config.h" +#include "osm_bridge_xxx1.h" +#include "renderer_config.h" void* mbuffer; static const char* osm_LogTag = "OSMBridge"; -static __thread spare_osm_render_window_t* currentBundle; -static char spare_no_render_buffer[4]; +static __thread xxx1_osm_render_window_t* currentBundle; +static char xxx1_no_render_buffer[4]; static bool hasSetNoRendererBuffer = false; void setNativeWindowSwapInterval(struct ANativeWindow* nativeWindow, int swapInterval); -bool spare_osm_init() { +bool xxx1_osm_init() { dlsym_OSMesa(); return true; } -spare_osm_render_window_t* spare_osm_get_current() { +xxx1_osm_render_window_t* xxx1_osm_get_current() { return currentBundle; } -spare_osm_render_window_t* spare_osm_init_context(spare_osm_render_window_t* share) { +xxx1_osm_render_window_t* xxx1_osm_init_context(xxx1_osm_render_window_t* share) { - spare_osm_render_window_t* render_window = malloc(sizeof(spare_osm_render_window_t)); - if(render_window == NULL) return NULL; + xxx1_osm_render_window_t* render_window = malloc(sizeof(xxx1_osm_render_window_t)); + if (render_window == NULL) return NULL; printf("%s: generating context\n", osm_LogTag); - memset(render_window, 0, sizeof(spare_osm_render_window_t)); + memset(render_window, 0, sizeof(xxx1_osm_render_window_t)); OSMesaContext osmesa_share = NULL; if (share != NULL) osmesa_share = share->context; OSMesaContext context = OSMesaCreateContext_p(OSMESA_RGBA, osmesa_share); - if(context == NULL) + if (context == NULL) { free(render_window); return NULL; @@ -52,17 +52,19 @@ spare_osm_render_window_t* spare_osm_init_context(spare_osm_render_window_t* sha } -void spare_osm_set_no_render_buffer(ANativeWindow_Buffer* buffer) { - buffer->bits = &spare_no_render_buffer; +void xxx1_osm_set_no_render_buffer(ANativeWindow_Buffer* buffer) { + buffer->bits = &xxx1_no_render_buffer; buffer->width = 1; buffer->height = 1; buffer->stride = 0; } -void spare_osm_swap_surfaces(spare_osm_render_window_t* bundle) { +void xxx1_osm_swap_surfaces(xxx1_osm_render_window_t* bundle) { - if(bundle->nativeSurface != NULL && bundle->newNativeSurface != bundle->nativeSurface) { - if(!bundle->disable_rendering) { + if (bundle->nativeSurface != NULL && bundle->newNativeSurface != bundle->nativeSurface) + { + if (!bundle->disable_rendering) + { printf("%s: Unlocking for cleanup...\n", osm_LogTag); ANativeWindow_unlockAndPost(bundle->nativeSurface); } @@ -81,27 +83,18 @@ void spare_osm_swap_surfaces(spare_osm_render_window_t* bundle) { } else { printf("%s:No new native surface, switching to dummy framebuffer\n", osm_LogTag); bundle->nativeSurface = NULL; - spare_osm_set_no_render_buffer(&bundle->buffer); + xxx1_osm_set_no_render_buffer(&bundle->buffer); bundle->disable_rendering = true; } } -void spare_osm_release_window() { +void xxx1_osm_release_window() { currentBundle->newNativeSurface = NULL; - spare_osm_swap_surfaces(currentBundle); + xxx1_osm_swap_surfaces(currentBundle); } -void spare_osm_apply_current_l(ANativeWindow_Buffer* buffer) { - /** - *printf("%s: context= %d, setbuffer: %d, width= %d, height= %d, stride= %d \n", - * osm_LogTag, - * currentBundle->context, - * buffer->bits, - * buffer->width, - * buffer->height, - * buffer->stride); - */ +void xxx1_osm_apply_current_l(ANativeWindow_Buffer* buffer) { OSMesaMakeCurrent_p(currentBundle->context, buffer->bits, GL_UNSIGNED_BYTE, @@ -112,17 +105,7 @@ void spare_osm_apply_current_l(ANativeWindow_Buffer* buffer) { currentBundle->last_stride = buffer->stride; } -void spare_osm_apply_current_ll(ANativeWindow_Buffer* buffer) { - /** - *printf("%s: context= %d, setbuffer: %d, width= %d, height= %d, stride= %d \n", - * osm_LogTag, - * currentBundle->context, - * buffer->bits, - * buffer->width, - * buffer->height, - * buffer->stride); - */ - +void xxx1_osm_apply_current_ll(ANativeWindow_Buffer* buffer) { if (SpareBuffer()) { #ifdef FRAME_BUFFER_SUPPOST @@ -146,7 +129,7 @@ void spare_osm_apply_current_ll(ANativeWindow_Buffer* buffer) { currentBundle->last_stride = buffer->stride; } -void spare_osm_make_current(spare_osm_render_window_t* bundle) { +void xxx1_osm_make_current(xxx1_osm_render_window_t* bundle) { if (bundle == NULL) { @@ -168,13 +151,13 @@ void spare_osm_make_current(spare_osm_render_window_t* bundle) { if (bundle->nativeSurface == NULL) { - spare_osm_swap_surfaces(bundle); + xxx1_osm_swap_surfaces(bundle); if(hasSetMainWindow) pojav_environ->mainWindowBundle->state = STATE_RENDERER_ALIVE; } if (!hasSetNoRendererBuffer) { - spare_osm_set_no_render_buffer(&bundle->buffer); + xxx1_osm_set_no_render_buffer(&bundle->buffer); printf("%s: Has set no renderer buffer!\n", osm_LogTag); hasSetNoRendererBuffer = true; } @@ -182,34 +165,33 @@ void spare_osm_make_current(spare_osm_render_window_t* bundle) { printf("%s: making current\n", osm_LogTag); printf("%s: bundle buffer = %d\n", osm_LogTag, bundle->buffer); - spare_osm_apply_current_ll(¤tBundle->buffer); + xxx1_osm_apply_current_ll(¤tBundle->buffer); OSMesaPixelStore_p(OSMESA_Y_UP, 0); } -void spare_osm_swap_buffers() { +void xxx1_osm_swap_buffers() { if (currentBundle->state == STATE_RENDERER_NEW_WINDOW) { - spare_osm_swap_surfaces(currentBundle); + xxx1_osm_swap_surfaces(currentBundle); currentBundle->state = STATE_RENDERER_ALIVE; } if (currentBundle->nativeSurface != NULL && !currentBundle->disable_rendering) if (ANativeWindow_lock(currentBundle->nativeSurface, ¤tBundle->buffer, NULL) != 0) - spare_osm_release_window(); + xxx1_osm_release_window(); - // printf("%s: swap buffers: %d\n", osm_LogTag, currentBundle->buffer); - spare_osm_apply_current_l(¤tBundle->buffer); + xxx1_osm_apply_current_l(¤tBundle->buffer); glFinish_p(); if (currentBundle->nativeSurface != NULL && !currentBundle->disable_rendering) if (ANativeWindow_unlockAndPost(currentBundle->nativeSurface) != 0) - spare_osm_release_window(); + xxx1_osm_release_window(); } -void spare_osm_setup_window() { +void xxx1_osm_setup_window() { if (pojav_environ->mainWindowBundle != NULL) { @@ -220,7 +202,7 @@ void spare_osm_setup_window() { } -void spare_osm_swap_interval(int swapInterval) { +void xxx1_osm_swap_interval(int swapInterval) { if (pojav_environ->mainWindowBundle != NULL && pojav_environ->mainWindowBundle->nativeSurface != NULL) setNativeWindowSwapInterval(pojav_environ->mainWindowBundle->nativeSurface, swapInterval); diff --git a/app_pojavlauncher/src/main/jni/ctxbridges/osm_bridge_xxx1.h b/app_pojavlauncher/src/main/jni/ctxbridges/osm_bridge_xxx1.h new file mode 100644 index 000000000..f16d210bd --- /dev/null +++ b/app_pojavlauncher/src/main/jni/ctxbridges/osm_bridge_xxx1.h @@ -0,0 +1,29 @@ +// +// Created by Vera-Firefly on 02.08.2024. +// +#include +#include +#ifndef POJAVLAUNCHER_OSM_BRIDGE_XXX1_H +#define POJAVLAUNCHER_OSM_BRIDGE_XXX1_H +#include "osmesa_loader.h" + + +typedef struct { + char state; + struct ANativeWindow *nativeSurface; + struct ANativeWindow *newNativeSurface; + ANativeWindow_Buffer buffer; + int32_t last_stride; + bool disable_rendering; + OSMesaContext context; +} xxx1_osm_render_window_t; + +bool xxx1_osm_init(); +xxx1_osm_render_window_t* xxx1_osm_get_current(); +xxx1_osm_render_window_t* xxx1_osm_init_context(xxx1_osm_render_window_t* share); +void xxx1_osm_make_current(xxx1_osm_render_window_t* bundle); +void xxx1_osm_swap_buffers(); +void xxx1_osm_setup_window(); +void xxx1_osm_swap_interval(int swapInterval); + +#endif //POJAVLAUNCHER_OSM_BRIDGE_XXX1_H diff --git a/app_pojavlauncher/src/main/jni/ctxbridges/osm_bridge_xxx2.c b/app_pojavlauncher/src/main/jni/ctxbridges/osm_bridge_xxx2.c new file mode 100644 index 000000000..5a215c0cf --- /dev/null +++ b/app_pojavlauncher/src/main/jni/ctxbridges/osm_bridge_xxx2.c @@ -0,0 +1,112 @@ +// +// Created by Vera-Firefly on 20.08.2024. +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include "environ/environ.h" +#include "osm_bridge_xxx2.h" +#include "osmesa_loader.h" +#include "renderer_config.h" + +ANativeWindow_Buffer buf; +int32_t stride; +void *abuffer; + +void *xxx2OsmGetCurrentContext() { + return (void *)OSMesaGetCurrentContext_p(); +} + +void xxx2OsmloadSymbols() { + dlsym_OSMesa(); +} + +void xxx2OsmSwapBuffers() { + OSMesaContext ctx = OSMesaGetCurrentContext_p(); + if (ctx == NULL) + printf("Zink: attempted to swap buffers without context!"); + + OSMesaMakeCurrent_p(ctx,buf.bits,GL_UNSIGNED_BYTE,pojav_environ->savedWidth,pojav_environ->savedHeight); + glFinish_p(); + ANativeWindow_unlockAndPost(pojav_environ->pojavWindow); + ANativeWindow_lock(pojav_environ->pojavWindow,&buf,NULL); +} + +void xxx2OsmMakeCurrent(void *window) { + printf("OSMDroid: making current\n"); + + if (SpareBuffer()) + { + #ifdef FRAME_BUFFER_SUPPOST + OSMesaMakeCurrent_p((OSMesaContext)window, + abuffer, + GL_UNSIGNED_BYTE, + pojav_environ->savedWidth, + pojav_environ->savedHeight); + #else + printf("[ERROR]: Macro FRAME_BUFFER_SUPPOST is undefined\n"); + #endif + } else OSMesaMakeCurrent_p((OSMesaContext)window, + setbuffer, + GL_UNSIGNED_BYTE, + pojav_environ->savedWidth, + pojav_environ->savedHeight); + + ANativeWindow_lock(pojav_environ->pojavWindow,&buf,NULL); + OSMesaPixelStore_p(OSMESA_ROW_LENGTH,buf.stride); + stride = buf.stride; + OSMesaPixelStore_p(OSMESA_Y_UP,0); + + printf("OSMDroid: vendor: %s\n",glGetString_p(GL_VENDOR)); + printf("OSMDroid: renderer: %s\n",glGetString_p(GL_RENDERER)); + glClear_p(GL_COLOR_BUFFER_BIT); + glClearColor_p(0.4f, 0.4f, 0.4f, 1.0f); + xxx2OsmSwapBuffers(); +} + +void *xxx2OsmCreateContext(void *contextSrc) { + printf("OSMDroid: generating context\n"); + void *ctx = OSMesaCreateContext_p(OSMESA_RGBA, contextSrc); + printf("OSMDroid: context=%p\n", ctx); + return ctx; +} + +void xxx2OsmSwapInterval(int interval) { + // Nothing to do here +} + +int xxx2OsmInit() { + if (pojav_environ->config_bridge != BRIDGE_TBL_XXX2) + return 0; + + if (SpareBuffer()) + { + #ifdef FRAME_BUFFER_SUPPOST + + printf("OSMDroid: width=%i;height=%i, reserving %i bytes for frame buffer\n", + pojav_environ->savedWidth, pojav_environ->savedHeight, + pojav_environ->savedWidth * 4 * pojav_environ->savedHeight); + abuffer = calloc(pojav_environ->savedWidth *4, pojav_environ->savedHeight +1); + + if (abuffer) + { + printf("OSMDroid: created frame buffer\n"); + return 1; + } else { + printf("OSMDroid: can't generate frame buffer\n"); + return 0; + } + #else + printf("[WORNING]: Macro FRAME_BUFFER_SUPPOST is undefined,defult to close\n"); + #endif + + } else printf("OSMDroid: do not set frame buffer\n"); + + return 0; +} \ No newline at end of file diff --git a/app_pojavlauncher/src/main/jni/ctxbridges/osm_bridge_xxx2.h b/app_pojavlauncher/src/main/jni/ctxbridges/osm_bridge_xxx2.h new file mode 100644 index 000000000..7db4b6779 --- /dev/null +++ b/app_pojavlauncher/src/main/jni/ctxbridges/osm_bridge_xxx2.h @@ -0,0 +1,19 @@ +// +// Created by Vera-Firefly on 14.11.2024. +// + +#ifndef OSM_BRIDGE_XXX2_H +#define OSM_BRIDGE_XXX2_H + +#include +#include + +void* xxx2OsmGetCurrentContext(); +void xxx2OsmloadSymbols(); +int xxx2OsmInit(); +void xxx2OsmSwapBuffers(); +void xxx2OsmMakeCurrent(void* window); +void* xxx2OsmCreateContext(void* contextSrc); +void xxx2OsmSwapInterval(int interval); + +#endif //OSM_BRIDGE_XXX2_H diff --git a/app_pojavlauncher/src/main/jni/ctxbridges/osmesa_loader.c b/app_pojavlauncher/src/main/jni/ctxbridges/osmesa_loader.c index 3c2778527..e10247dc3 100644 --- a/app_pojavlauncher/src/main/jni/ctxbridges/osmesa_loader.c +++ b/app_pojavlauncher/src/main/jni/ctxbridges/osmesa_loader.c @@ -27,8 +27,9 @@ void dlsym_OSMesa() { char* main_path = NULL; char* mesa_library = getenv("MESA_LIBRARY"); if (pojav_environ->config_renderer == RENDERER_VK_ZINK - || pojav_environ->config_renderer == RENDERER_VK_ZINK_PREF - || pojav_environ->config_renderer == RENDERER_VIRGL) + || pojav_environ->config_renderer == RENDERER_VK_ZINK_XXX1 + || pojav_environ->config_renderer == RENDERER_VIRGL + || pojav_environ->config_renderer == RENDERER_VK_ZINK_XXX2) { if (strncmp(mesa_library, "/data", 5) == 0) { diff --git a/app_pojavlauncher/src/main/jni/ctxbridges/renderer_config.h b/app_pojavlauncher/src/main/jni/ctxbridges/renderer_config.h index d09adf723..c66ea1013 100644 --- a/app_pojavlauncher/src/main/jni/ctxbridges/renderer_config.h +++ b/app_pojavlauncher/src/main/jni/ctxbridges/renderer_config.h @@ -9,7 +9,14 @@ #define RENDERER_VIRGL 3 #define RENDERER_VULKAN 4 #define RENDERER_VK_WARLIP 5 -#define RENDERER_VK_ZINK_PREF 6 +#define RENDERER_VK_ZINK_XXX1 6 +#define RENDERER_VK_ZINK_XXX2 7 + +#define BRIDGE_TBL_DEFAULT 0 +#define BRIDGE_TBL_XXX1 1 +#define BRIDGE_TBL_XXX2 2 +#define BRIDGE_TBL_XXX3 3 +#define BRIDGE_TBL_XXX4 4 @@ -30,4 +37,21 @@ extern EGLConfig config; #endif // POTATOBRIDGE_H +#ifndef SPARE_RENDERER_CONFIG_H +#define SPARE_RENDERER_CONFIG_H + +int SpareBuffer(); + +#endif + +#ifndef FRAME_BUFFER_SUPPOST +#define FRAME_BUFFER_SUPPOST + +extern void *abuffer; +extern void *gbuffer; +extern void *mbuffer; + + +#endif + diff --git a/app_pojavlauncher/src/main/jni/ctxbridges/spare_bridge.h b/app_pojavlauncher/src/main/jni/ctxbridges/spare_bridge.h deleted file mode 100644 index 9c443b776..000000000 --- a/app_pojavlauncher/src/main/jni/ctxbridges/spare_bridge.h +++ /dev/null @@ -1,47 +0,0 @@ -// -// Created by Vera-Firefly on 02.08.2024. -// - -#ifndef POJAVLAUNCHER_SPARE_BRIDGE_H -#define POJAVLAUNCHER_SPARE_BRIDGE_H - -#include -// #include -#include - -typedef basic_render_window_t* (*spare_init_context_t)(basic_render_window_t* share); -typedef void (*spare_make_current_t)(basic_render_window_t* bundle); -typedef basic_render_window_t* (*spare_get_current_t)(); - -bool (*spare_init)() = NULL; -spare_init_context_t spare_init_context = NULL; -spare_make_current_t spare_make_current = NULL; -spare_get_current_t spare_get_current = NULL; -void (*spare_swap_buffers)() = NULL; -void (*spare_setup_window)() = NULL; -void (*spare_swap_interval)(int swapInterval) = NULL; - - -void spare_osm_bridge() { - spare_init = spare_osm_init; - spare_init_context = (spare_init_context_t) spare_osm_init_context; - spare_make_current = (spare_make_current_t) spare_osm_make_current; - spare_get_current = (spare_get_current_t) spare_osm_get_current; - spare_swap_buffers = spare_osm_swap_buffers; - spare_setup_window = spare_osm_setup_window; - spare_swap_interval = spare_osm_swap_interval; -} - -/* -void spare_gl_bridge() { - spare_init = gl_init; - spare_init_context = (spare_init_context_t) gl_init_context; - spare_make_current = (spare_make_current_t) gl_make_current; - spare_get_current = (spare_get_current_t) gl_get_current; - spare_swap_buffers = gl_swap_buffers; - spare_setup_window = gl_setup_window; - spare_swap_interval = gl_swap_interval; -} -*/ - -#endif //POJAVLAUNCHER_SPARE_BRIDGE_H diff --git a/app_pojavlauncher/src/main/jni/ctxbridges/spare_osm_bridge.h b/app_pojavlauncher/src/main/jni/ctxbridges/spare_osm_bridge.h deleted file mode 100644 index d62d51d85..000000000 --- a/app_pojavlauncher/src/main/jni/ctxbridges/spare_osm_bridge.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// Created by Vera-Firefly on 02.08.2024. -// -#include -#include -#ifndef POJAVLAUNCHER_SPARE_OSM_BRIDGE_H -#define POJAVLAUNCHER_SPARE_OSM_BRIDGE_H -#include "osmesa_loader.h" - - -typedef struct { - char state; - struct ANativeWindow *nativeSurface; - struct ANativeWindow *newNativeSurface; - ANativeWindow_Buffer buffer; - int32_t last_stride; - bool disable_rendering; - OSMesaContext context; -} spare_osm_render_window_t; - -bool spare_osm_init(); -spare_osm_render_window_t* spare_osm_get_current(); -spare_osm_render_window_t* spare_osm_init_context(spare_osm_render_window_t* share); -void spare_osm_make_current(spare_osm_render_window_t* bundle); -void spare_osm_swap_buffers(); -void spare_osm_setup_window(); -void spare_osm_swap_interval(int swapInterval); - -#endif //POJAVLAUNCHER_SPARE_OSM_BRIDGE_H diff --git a/app_pojavlauncher/src/main/jni/ctxbridges/spare_renderer_config.h b/app_pojavlauncher/src/main/jni/ctxbridges/spare_renderer_config.h deleted file mode 100644 index 48b280b23..000000000 --- a/app_pojavlauncher/src/main/jni/ctxbridges/spare_renderer_config.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// Created by Vera-Firefly on 03,08,2024. -// - -#ifndef SPARE_RENDERER_CONFIG_H -#define SPARE_RENDERER_CONFIG_H - -int SpareBridge(); -int SpareBuffer(); - -#endif - -#ifndef FRAME_BUFFER_SUPPOST -#define FRAME_BUFFER_SUPPOST - -extern void *gbuffer; -extern void *mbuffer; - -#endif diff --git a/app_pojavlauncher/src/main/jni/ctxbridges/virgl_bridge.c b/app_pojavlauncher/src/main/jni/ctxbridges/virgl_bridge.c index 9596d04e8..379aade6c 100644 --- a/app_pojavlauncher/src/main/jni/ctxbridges/virgl_bridge.c +++ b/app_pojavlauncher/src/main/jni/ctxbridges/virgl_bridge.c @@ -15,7 +15,6 @@ #include "egl_loader.h" #include "osmesa_loader.h" #include "renderer_config.h" -#include "spare_renderer_config.h" int (*vtest_main_p)(int argc, char **argv); void (*vtest_swap_buffers_p)(void); diff --git a/app_pojavlauncher/src/main/jni/egl_bridge.c b/app_pojavlauncher/src/main/jni/egl_bridge.c index 84130777d..6e86d391e 100644 --- a/app_pojavlauncher/src/main/jni/egl_bridge.c +++ b/app_pojavlauncher/src/main/jni/egl_bridge.c @@ -31,9 +31,8 @@ #include "ctxbridges/gl_bridge.h" #include "ctxbridges/bridge_tbl.h" #include "ctxbridges/osm_bridge.h" -#include "ctxbridges/spare_bridge.h" -#include "ctxbridges/spare_osm_bridge.h" -#include "ctxbridges/spare_renderer_config.h" +#include "ctxbridges/osm_bridge_xxx1.h" +#include "ctxbridges/osm_bridge_xxx2.h" #include "ctxbridges/renderer_config.h" #include "ctxbridges/virgl_bridge.h" #include "driver_helper/nsbypass.h" @@ -70,14 +69,46 @@ EXTERNAL_API void pojavTerminate() { potatoBridge.eglSurface = EGL_NO_SURFACE; } break; case RENDERER_VK_ZINK: - case RENDERER_VK_ZINK_PREF: + case RENDERER_VK_ZINK_XXX1: + case RENDERER_VK_ZINK_XXX2: + // Nothing to do here break; } } -int SpareBridge() { - if (getenv("POJAV_SPARE_BRIDGE") != NULL) return 1; - return 0; +void ConfigBridgeTbl() { + const char* bridge_tbl = getenv("POJAV_CONFIG_BRIDGE"); + if (bridge_tbl == NULL) + { + pojav_environ->config_bridge = BRIDGE_TBL_DEFAULT; + return; + } + + struct { + const char* key; + int value; + } bridge_map[] = { + {"xxx1", BRIDGE_TBL_XXX1}, + {"xxx2", BRIDGE_TBL_XXX2}, + {"xxx3", BRIDGE_TBL_XXX3}, + {"xxx4", BRIDGE_TBL_XXX4}, + }; + + int hasSelected = 0; + for (int i = 0; i < sizeof(bridge_map) / sizeof(bridge_map[0]); ++i) + { + if (!strcmp(bridge_tbl, bridge_map[i].key)) + { + pojav_environ->config_bridge = bridge_map[i].value; + hasSelected = 1; + break; + } + } + if (hasSelected == 0) + { + printf("Config Bridge: Config not found, using default config\n"); + pojav_environ->config_bridge = BRIDGE_TBL_DEFAULT; + } } int SpareBuffer() { @@ -89,14 +120,11 @@ JNIEXPORT void JNICALL Java_net_kdt_pojavlaunch_utils_JREUtils_setupBridgeWindow(JNIEnv* env, ABI_COMPAT jclass clazz, jobject surface) { pojav_environ->pojavWindow = ANativeWindow_fromSurface(env, surface); - if (SpareBridge() && pojav_environ->config_renderer == RENDERER_GL4ES) + if (pojav_environ->config_bridge != 0 && pojav_environ->config_renderer == RENDERER_GL4ES) gl_setup_window(); if (br_setup_window) br_setup_window(); - // pojav_environ->config_renderer == RENDERER_VK_ZINK_PREF - if (spare_setup_window) spare_setup_window(); - } JNIEXPORT void JNICALL @@ -110,15 +138,15 @@ don't touch the code here */ EXTERNAL_API void* pojavGetCurrentContext() { - if (SpareBridge() && pojav_environ->config_renderer == RENDERER_GL4ES) + if (pojav_environ->config_bridge != 0 && pojav_environ->config_renderer == RENDERER_GL4ES) return (void *)eglGetCurrentContext_p(); - if (pojav_environ->config_renderer == RENDERER_VK_ZINK_PREF) - return spare_get_current(); - if (pojav_environ->config_renderer == RENDERER_VIRGL) return virglGetCurrentContext(); + if (pojav_environ->config_renderer == RENDERER_VK_ZINK_XXX2) + return xxx2OsmGetCurrentContext(); + return br_get_current(); } @@ -133,7 +161,8 @@ void load_vulkan() { // the loader does not support below that #ifdef ADRENO_POSSIBLE void* result = load_turnip_vulkan(); - if(result != NULL) { + if (result != NULL) + { printf("AdrenoSupp: Loaded Turnip, loader address: %p\n", result); set_vulkan_ptr(result); return; @@ -147,12 +176,33 @@ void load_vulkan() { } void renderer_load_config() { - if(!SpareBridge()) { + ConfigBridgeTbl(); + if (pojav_environ->config_bridge == 0) + { pojav_environ->config_renderer = RENDERER_VK_ZINK; set_osm_bridge_tbl(); - } else { - pojav_environ->config_renderer = RENDERER_VK_ZINK_PREF; - spare_osm_bridge(); + return; + } + printf("Config Bridge: Config = %p\n", pojav_environ->config_bridge); + switch (pojav_environ->config_bridge) { + case BRIDGE_TBL_XXX1: { + pojav_environ->config_renderer = RENDERER_VK_ZINK_XXX1; + osm_bridge_xxx1(); + } break; + case BRIDGE_TBL_XXX2: { + pojav_environ->config_renderer = RENDERER_VK_ZINK_XXX2; + xxx2OsmInit(); + xxx2OsmloadSymbols(); + } break; + case BRIDGE_TBL_XXX3: + // Nothing to do here + break; + case BRIDGE_TBL_XXX4: + // Nothing to do here + break; + default: + set_osm_bridge_tbl(); + break; } } @@ -171,8 +221,9 @@ int pojavInitOpenGL() { if (!strncmp("opengles", renderer, 8)) { + ConfigBridgeTbl(); pojav_environ->config_renderer = RENDERER_GL4ES; - if (!SpareBridge()) set_gl_bridge_tbl(); + if (pojav_environ->config_bridge == 0) set_gl_bridge_tbl(); } if (!strcmp(renderer, "mesa_3d")) @@ -233,16 +284,17 @@ int pojavInitOpenGL() { if (pojav_environ->config_renderer == RENDERER_GL4ES) { - if (SpareBridge()) + if (pojav_environ->config_bridge != 0) { + printf("Config Bridge: Config = %p\n", pojav_environ->config_bridge); if (gl_init()) gl_setup_window(); } else { if (br_init()) br_setup_window(); } } - if (pojav_environ->config_renderer == RENDERER_VK_ZINK_PREF) - if (spare_init()) spare_setup_window(); + if (pojav_environ->config_renderer == RENDERER_VK_ZINK_XXX1) + if (br_init()) br_setup_window(); return 0; } @@ -278,7 +330,7 @@ EXTERNAL_API void pojavSwapBuffers() { if (pojav_environ->config_renderer == RENDERER_VK_ZINK || pojav_environ->config_renderer == RENDERER_GL4ES) { - if (SpareBridge() && pojav_environ->config_renderer == RENDERER_GL4ES) + if (pojav_environ->config_bridge != 0 && pojav_environ->config_renderer == RENDERER_GL4ES) gl_swap_buffers(); else br_swap_buffers(); } @@ -286,8 +338,11 @@ EXTERNAL_API void pojavSwapBuffers() { if (pojav_environ->config_renderer == RENDERER_VIRGL) virglSwapBuffers(); - if (pojav_environ->config_renderer == RENDERER_VK_ZINK_PREF) - spare_swap_buffers(); + if (pojav_environ->config_renderer == RENDERER_VK_ZINK_XXX2) + xxx2OsmSwapBuffers(); + + if (pojav_environ->config_renderer == RENDERER_VK_ZINK_XXX1) + br_swap_buffers(); } EXTERNAL_API void pojavMakeCurrent(void* window) { @@ -296,32 +351,35 @@ EXTERNAL_API void pojavMakeCurrent(void* window) { if (pojav_environ->config_renderer == RENDERER_VK_ZINK || pojav_environ->config_renderer == RENDERER_GL4ES) { - if(SpareBridge() && pojav_environ->config_renderer == RENDERER_GL4ES) + if (pojav_environ->config_bridge != 0 && pojav_environ->config_renderer == RENDERER_GL4ES) gl_make_current((gl_render_window_t*)window); else br_make_current((basic_render_window_t*)window); } - if (pojav_environ->config_renderer == RENDERER_VK_ZINK_PREF) - spare_make_current((basic_render_window_t*)window); + if (pojav_environ->config_renderer == RENDERER_VK_ZINK_XXX1) + br_make_current((basic_render_window_t*)window); if (pojav_environ->config_renderer == RENDERER_VIRGL) virglMakeCurrent(window); + if (pojav_environ->config_renderer == RENDERER_VK_ZINK_XXX2) + xxx2OsmMakeCurrent(window); + } EXTERNAL_API void* pojavCreateContext(void* contextSrc) { if (pojav_environ->config_renderer == RENDERER_VULKAN) return (void *) pojav_environ->pojavWindow; - if (SpareBridge() && pojav_environ->config_renderer == RENDERER_GL4ES) + if (pojav_environ->config_bridge != 0 && pojav_environ->config_renderer == RENDERER_GL4ES) return gl_init_context(contextSrc); - if (pojav_environ->config_renderer == RENDERER_VK_ZINK_PREF) - return spare_init_context((basic_render_window_t*)contextSrc); - if (pojav_environ->config_renderer == RENDERER_VIRGL) return virglCreateContext(contextSrc); + if (pojav_environ->config_renderer == RENDERER_VK_ZINK_XXX2) + return xxx2OsmCreateContext(contextSrc); + return br_init_context((basic_render_window_t*)contextSrc); } @@ -331,15 +389,16 @@ Java_org_lwjgl_vulkan_VK_getVulkanDriverHandle(ABI_COMPAT JNIEnv *env, ABI_COMPA // The code below still uses the env var because // 1. it's easier to do that // 2. it won't break if something will try to load vulkan and osmesa simultaneously - if(getenv("VULKAN_PTR") == NULL) load_vulkan(); + if (getenv("VULKAN_PTR") == NULL) load_vulkan(); return strtoul(getenv("VULKAN_PTR"), NULL, 0x10); } #ifdef FRAME_BUFFER_SUPPOST EXTERNAL_API JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL_nativeRegalMakeCurrent(JNIEnv *env, jclass clazz) { - if (SpareBuffer() && (pojav_environ->config_renderer == RENDERER_VK_ZINK_PREF - || pojav_environ->config_renderer == RENDERER_VIRGL)) + if (SpareBuffer() && (pojav_environ->config_renderer == RENDERER_VK_ZINK_XXX1 + || pojav_environ->config_renderer == RENDERER_VIRGL + || pojav_environ->config_renderer == RENDERER_VK_ZINK_XXX2)) { /*printf("Regal: making current"); @@ -354,15 +413,20 @@ Java_org_lwjgl_opengl_GL_nativeRegalMakeCurrent(JNIEnv *env, jclass clazz) { EXTERNAL_API JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_GL_getGraphicsBufferAddr(JNIEnv *env, jobject thiz) { if (SpareBuffer() && pojav_environ->config_renderer == RENDERER_VIRGL) + { return &gbuffer; - else if (SpareBuffer() && pojav_environ->config_renderer == RENDERER_VK_ZINK_PREF) + } else if (SpareBuffer() && pojav_environ->config_renderer == RENDERER_VK_ZINK_XXX1) { return &mbuffer; + } else if (SpareBuffer() && pojav_environ->config_renderer == RENDERER_VK_ZINK_XXX2) { + return &abuffer; + } } EXTERNAL_API JNIEXPORT jintArray JNICALL Java_org_lwjgl_opengl_GL_getNativeWidthHeight(JNIEnv *env, jobject thiz) { - if (SpareBuffer() && (pojav_environ->config_renderer == RENDERER_VK_ZINK_PREF - || pojav_environ->config_renderer == RENDERER_VIRGL)) + if (SpareBuffer() && (pojav_environ->config_renderer == RENDERER_VK_ZINK_XXX1 + || pojav_environ->config_renderer == RENDERER_VIRGL + || pojav_environ->config_renderer == RENDERER_VK_ZINK_XXX2)) { jintArray ret = (*env)->NewIntArray(env,2); jint arr[] = {pojav_environ->savedWidth, pojav_environ->savedHeight}; @@ -376,7 +440,7 @@ EXTERNAL_API void pojavSwapInterval(int interval) { if(pojav_environ->config_renderer == RENDERER_VK_ZINK || pojav_environ->config_renderer == RENDERER_GL4ES) { - if(SpareBridge() && pojav_environ->config_renderer == RENDERER_GL4ES) + if (pojav_environ->config_bridge != 0 && pojav_environ->config_renderer == RENDERER_GL4ES) gl_swap_interval(interval); else br_swap_interval(interval); } @@ -384,9 +448,12 @@ EXTERNAL_API void pojavSwapInterval(int interval) { if (pojav_environ->config_renderer == RENDERER_VIRGL) virglSwapInterval(interval); - if (pojav_environ->config_renderer == RENDERER_VK_ZINK_PREF) + if (pojav_environ->config_renderer == RENDERER_VK_ZINK_XXX2) + xxx2OsmSwapInterval(interval); + + if (pojav_environ->config_renderer == RENDERER_VK_ZINK_XXX1) { - spare_swap_interval(interval); + br_swap_interval(interval); printf("eglSwapInterval: NOT IMPLEMENTED YET!\n"); // Nothing to do here } diff --git a/app_pojavlauncher/src/main/jni/environ/environ.h b/app_pojavlauncher/src/main/jni/environ/environ.h index 4d73f1fb3..32cac7072 100644 --- a/app_pojavlauncher/src/main/jni/environ/environ.h +++ b/app_pojavlauncher/src/main/jni/environ/environ.h @@ -34,6 +34,7 @@ struct pojav_environ_s { struct ANativeWindow* pojavWindow; basic_render_window_t* mainWindowBundle; int config_renderer; + int config_bridge; bool force_vsync; atomic_size_t eventCounter; // Count the number of events to be pumped out GLFWInputEvent events[EVENT_WINDOW_SIZE]; diff --git a/app_pojavlauncher/src/main/res/values-ar/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-ar/pgw_strings.xml index d6792d455..4184da29c 100644 --- a/app_pojavlauncher/src/main/res/values-ar/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-ar/pgw_strings.xml @@ -52,8 +52,6 @@ إعدادات Renderer التجريبية تمكين إعدادات Renderer التجريبية استخدام إعدادات Renderer المحددة - الجسر الاحتياطي - استخدام الجسر الثاني في حال فشل الإطلاق إطار مؤقت احتياطي استخدام الإطار المؤقت الثاني في حال فشل الإطلاق Renderer (إضافي) diff --git a/app_pojavlauncher/src/main/res/values-az-rAZ/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-az-rAZ/pgw_strings.xml index 061416785..d63dbc5b7 100644 --- a/app_pojavlauncher/src/main/res/values-az-rAZ/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-az-rAZ/pgw_strings.xml @@ -52,8 +52,6 @@ Renderer eksperimental tənzimləmələri Eksperimental Renderer Tənzimləmələrini Aktivləşdir Renderer-ə xüsusi tənzimləmələrdən istifadə et - Ehtiyat Körpü - İkinci sxem körpüsünü istifadə et, əgər başlamaq uğursuz olarsa bağla Ehtiyat çərçivə buferi İkinci sxemin çərçivə buferini istifadə et, əgər başlamaq uğursuz olarsa bağla Renderer (Əlavə) diff --git a/app_pojavlauncher/src/main/res/values-cs/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-cs/pgw_strings.xml index c65a5cdd3..c4070c1aa 100644 --- a/app_pojavlauncher/src/main/res/values-cs/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-cs/pgw_strings.xml @@ -52,8 +52,6 @@ Experimentální nastavení rendereru Povolit experimentální nastavení rendereru Použít více specifických nastavení rendereru - Náhradní most - Použít druhý most, pokud se spuštění nezdaří Náhradní framebuffer Použít framebuffer druhého schématu, pokud se spuštění nezdaří Renderer (Extra) diff --git a/app_pojavlauncher/src/main/res/values-de/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-de/pgw_strings.xml index a3642fd6f..731a74c61 100644 --- a/app_pojavlauncher/src/main/res/values-de/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-de/pgw_strings.xml @@ -52,8 +52,6 @@ Experimentelle Renderer-Einstellungen Experimentelle Renderer-Einstellungen aktivieren Weitere renderer-spezifische Einstellungen verwenden - Ersatzbrücke - Die zweite Brücke verwenden, wenn der Start fehlschlägt Ersatz-Framebuffer Den Framebuffer des zweiten Schemas verwenden, wenn der Start fehlschlägt Renderer (Extra) diff --git a/app_pojavlauncher/src/main/res/values-el/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-el/pgw_strings.xml index 30c9278f2..1bc2b7c0d 100644 --- a/app_pojavlauncher/src/main/res/values-el/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-el/pgw_strings.xml @@ -52,8 +52,6 @@ Πειραματικές ρυθμίσεις renderer Ενεργοποίηση πειραματικών ρυθμίσεων renderer Χρήση επιπλέον ρυθμίσεων συγκεκριμένων για τον renderer - Εφεδρική γέφυρα - Χρησιμοποιήστε το δεύτερο σχήμα γέφυρας, κλείστε αν η εκκίνηση αποτύχει Εφεδρικό framebuffer Χρησιμοποιήστε το framebuffer του δεύτερου σχήματος, κλείστε αν η εκκίνηση αποτύχει Renderer (Επιπλέον) diff --git a/app_pojavlauncher/src/main/res/values-en-rGB/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-en-rGB/pgw_strings.xml index 0787faec1..ba43c3e3d 100644 --- a/app_pojavlauncher/src/main/res/values-en-rGB/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-en-rGB/pgw_strings.xml @@ -52,8 +52,6 @@ Renderer experimental setup Enable Renderer Experimental Setup Use additional renderer-specific settings - Spare Bridge - Use the secondary bridge scheme, close if launch fails Spare Frame Buffer Use the frame buffer from the secondary scheme, close if launch fails Renderer (Extra) diff --git a/app_pojavlauncher/src/main/res/values-en-rPS/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-en-rPS/pgw_strings.xml index 520e3d824..946e6c212 100644 --- a/app_pojavlauncher/src/main/res/values-en-rPS/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-en-rPS/pgw_strings.xml @@ -52,8 +52,6 @@ Renderer exp setup Enable Renderer Exp Setup Use more renderer-specific settings - Spare Bridge - Use the second scheme bridge,close if launch failed Spare frame buffer Use the frame buffer of the second scheme, close it if launch failed Renderer (Extra) diff --git a/app_pojavlauncher/src/main/res/values-es/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-es/pgw_strings.xml index c1f241243..d990dcbb5 100644 --- a/app_pojavlauncher/src/main/res/values-es/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-es/pgw_strings.xml @@ -52,8 +52,6 @@ Configuración experimental de Renderer Habilitar configuración experimental de Renderer Usar configuraciones adicionales específicas del renderer - Puente de reserva - Usar el esquema de puente secundario, cerrar si el lanzamiento falla Buffer de cuadros de reserva Usar el buffer de cuadros del esquema secundario, cerrarlo si el lanzamiento falla Renderer (Extra) diff --git a/app_pojavlauncher/src/main/res/values-et-rEE/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-et-rEE/pgw_strings.xml index e18263257..e5a5ece58 100644 --- a/app_pojavlauncher/src/main/res/values-et-rEE/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-et-rEE/pgw_strings.xml @@ -52,8 +52,6 @@ Rendereri eksperimentaalsed seaded Luba Renderer\'i eksperimentaalsed seaded Kasutage täiendavaid renderer-spetsiifilisi seadeid - Varu sild - Kasutage teise skeemi silda, sulgege, kui käivitamine ebaõnnestub Varu raami puhverserver Kasutage teise skeemi raamipuhverserverit, sulgege, kui käivitamine ebaõnnestub Renderer (Extra) diff --git a/app_pojavlauncher/src/main/res/values-fa-rIR/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-fa-rIR/pgw_strings.xml index 4e6892b35..a7a083246 100644 --- a/app_pojavlauncher/src/main/res/values-fa-rIR/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-fa-rIR/pgw_strings.xml @@ -52,8 +52,6 @@ تنظیمات آزمایشی رندرر فعال کردن تنظیمات آزمایشی رندرر استفاده از تنظیمات خاص رندرر - پل اضافی - استفاده از پل طرح دوم، در صورت شکست راه‌اندازی ببندید بافر صفحه اضافی استفاده از بافر صفحه طرح دوم، در صورت شکست راه‌اندازی ببندید رندرر (اضافی) diff --git a/app_pojavlauncher/src/main/res/values-fil/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-fil/pgw_strings.xml index 5c93961da..6c6a79b97 100644 --- a/app_pojavlauncher/src/main/res/values-fil/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-fil/pgw_strings.xml @@ -52,8 +52,6 @@ Eksperimentong Pag-setup ng Rendra I-enable ang Eksperimentong Pag-setup ng Rendra Gamitin ang higit pang partikular na mga setting ng renderer - Spare Bridge - Gamitin ang pangalawang scheme ng bridge, isara kung nabigo ang paglunsad Spare Frame Buffer Gamitin ang frame buffer ng pangalawang scheme, isara kung nabigo ang paglunsad Renderer (Karagdagang) diff --git a/app_pojavlauncher/src/main/res/values-fr/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-fr/pgw_strings.xml index b97dd23c3..b46e92f48 100644 --- a/app_pojavlauncher/src/main/res/values-fr/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-fr/pgw_strings.xml @@ -52,8 +52,6 @@ Configuration expérimentale du renderer Activer la configuration expérimentale du renderer Utiliser plus de paramètres spécifiques au renderer - Pont de secours - Utiliser le deuxième schéma de pont, fermer en cas d\'échec de lancement Tampon de trame de secours Utiliser le tampon de trame du deuxième schéma, fermer en cas d\'échec de lancement Renderer (Supplémentaire) diff --git a/app_pojavlauncher/src/main/res/values-in/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-in/pgw_strings.xml index a3112521e..59e3bac80 100644 --- a/app_pojavlauncher/src/main/res/values-in/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-in/pgw_strings.xml @@ -52,8 +52,6 @@ Pengaturan eksperimen renderer Aktifkan Pengaturan Eksperimen Renderer Gunakan lebih banyak pengaturan khusus renderer - Cadangan Jembatan - Gunakan skema jembatan kedua, tutup jika peluncuran gagal Cadangan framebuffer Gunakan framebuffer skema kedua, tutup jika peluncuran gagal Renderer (Tambahan) diff --git a/app_pojavlauncher/src/main/res/values-it/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-it/pgw_strings.xml index 5add222ca..04f0b4ebf 100644 --- a/app_pojavlauncher/src/main/res/values-it/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-it/pgw_strings.xml @@ -52,8 +52,6 @@ Impostazioni sperimentali del renderer Abilita le Impostazioni Sperimentali del Renderer Usa più impostazioni specifiche del renderer - Ponte di riserva - Usa lo schema alternativo del ponte, chiudi se il lancio fallisce Frame buffer di riserva Usa il frame buffer dello schema alternativo, chiudi se il lancio fallisce Renderer (Extra) diff --git a/app_pojavlauncher/src/main/res/values-iw/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-iw/pgw_strings.xml index 1427cd07a..54ed95d5a 100644 --- a/app_pojavlauncher/src/main/res/values-iw/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-iw/pgw_strings.xml @@ -52,8 +52,6 @@ הגדרות ניסיוניות של רנדר הפעל הגדרות ניסיוניות של רנדר השתמש ביותר הגדרות רנדר ייחודיות - גשר נוסף - השתמש בגשר תוכנית שניה, סגור אם ההפעלה נכשלה מסגרת רזרבית השתמש במסגרת רזרבית של תוכנית שניה, סגור אם ההפעלה נכשלה רנדר (תוספת) diff --git a/app_pojavlauncher/src/main/res/values-ja/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-ja/pgw_strings.xml index fc322aa71..ee67553ad 100644 --- a/app_pojavlauncher/src/main/res/values-ja/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-ja/pgw_strings.xml @@ -52,8 +52,6 @@ レンダラーの実験的設定 レンダラーの実験的設定を有効にする よりレンダラー固有の設定を使用する - 予備ブリッジ - 第2のスキームブリッジを使用し、起動に失敗した場合は閉じます 予備フレームバッファ 第2のスキームフレームバッファを使用し、起動に失敗した場合は閉じます レンダラー(追加) diff --git a/app_pojavlauncher/src/main/res/values-ko/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-ko/pgw_strings.xml index 7f332e39b..3d56c4771 100644 --- a/app_pojavlauncher/src/main/res/values-ko/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-ko/pgw_strings.xml @@ -52,8 +52,6 @@ 렌더러 실험적 설정 렌더러 실험적 설정 활성화 더 많은 렌더러 전용 설정 사용 - 예비 브리지 - 두 번째 스킴 브리지를 사용합니다. 실행에 실패하면 닫습니다 예비 프레임 버퍼 두 번째 스킴의 프레임 버퍼를 사용합니다. 실행에 실패하면 닫습니다 렌더러 (추가) diff --git a/app_pojavlauncher/src/main/res/values-lt/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-lt/pgw_strings.xml index 5a812b2dc..b4525470b 100644 --- a/app_pojavlauncher/src/main/res/values-lt/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-lt/pgw_strings.xml @@ -52,8 +52,6 @@ Eksperimentiniai vaizdo apdorojimo nustatymai Įjungti vaizdo apdorojimo eksperimentinius nustatymus Naudoti daugiau vaizdo apdorojimo nustatymų - Atsarginis tiltas - Naudoti antrosios schemos tiltą, uždaryti, jei paleidimas nepavyko Atsarginis rėmelio buferis Naudoti antrosios schemos rėmelio buferį, uždaryti, jei paleidimas nepavyko Papildomas vaizdo apdorojimas diff --git a/app_pojavlauncher/src/main/res/values-uk/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-uk/pgw_strings.xml index 823a34415..33f537027 100644 --- a/app_pojavlauncher/src/main/res/values-uk/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-uk/pgw_strings.xml @@ -52,8 +52,6 @@ Експериментальні налаштування рендерера Увімкнути експериментальні налаштування рендерера Використовувати додаткові налаштування рендерера - Резервний міст - Використовувати другий мостовий план, закрити, якщо запуск не вдався Резервний буфер кадру Використовувати буфер кадру другого плану, закрити, якщо запуск не вдався Рендерер (Додатково) diff --git a/app_pojavlauncher/src/main/res/values-vi/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-vi/pgw_strings.xml index e3a656ea6..3861ec91b 100644 --- a/app_pojavlauncher/src/main/res/values-vi/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-vi/pgw_strings.xml @@ -52,8 +52,6 @@ Cài đặt thử nghiệm của trình kết xuất Kích hoạt cài đặt thử nghiệm của trình kết xuất Sử dụng các cài đặt đặc thù cho trình kết xuất - Cầu dự phòng - Sử dụng cầu của sơ đồ thứ hai, đóng lại nếu khởi động thất bại Bộ đệm khung dự phòng Sử dụng bộ đệm khung của sơ đồ thứ hai, đóng lại nếu khởi động thất bại Trình kết xuất (Thêm) diff --git a/app_pojavlauncher/src/main/res/values-zh-rCN/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-zh-rCN/pgw_strings.xml index 532a47b02..a8d420ec5 100644 --- a/app_pojavlauncher/src/main/res/values-zh-rCN/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-zh-rCN/pgw_strings.xml @@ -78,8 +78,7 @@ 渲染器实验性设置 启用渲染器实验性设置 更多的渲染器特定设置 - 备用桥接 - 使用第二方案桥接,如果启动失败,请关闭 + 桥接配置 备用帧缓冲区 使用第二方案帧缓冲区,如果启动失败,请关闭 渲染器 (拓展) diff --git a/app_pojavlauncher/src/main/res/values-zh-rTW/pgw_strings.xml b/app_pojavlauncher/src/main/res/values-zh-rTW/pgw_strings.xml index d8030cb25..53130887b 100644 --- a/app_pojavlauncher/src/main/res/values-zh-rTW/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values-zh-rTW/pgw_strings.xml @@ -78,8 +78,7 @@ 渲染器實驗性設置 啟用渲染器實驗性設置 使用更多渲染器特定設置 - 備用橋接 - 使用第二方案橋接,啟動失敗時關閉 + 橋接配置 備用幀緩衝區 使用第二方案的幀緩衝區,啟動失敗時關閉 渲染器 (額外) diff --git a/app_pojavlauncher/src/main/res/values/headings_array.xml b/app_pojavlauncher/src/main/res/values/headings_array.xml index d465a6b67..31b5f12d8 100644 --- a/app_pojavlauncher/src/main/res/values/headings_array.xml +++ b/app_pojavlauncher/src/main/res/values/headings_array.xml @@ -13,6 +13,19 @@ @string/mcl_setting_renderer_ltw + + opengles2 + opengles2_ptitseb + opengles2_vgpu + opengles2_vgpu_1 + mesa_3d + vulkan_zink + virglrenderer + freedreno + panfrost + opengles3_ltw + + @string/customctrl_addbutton @string/customctrl_addbutton_drawer @@ -42,19 +55,6 @@ @string/mcl_option_customcontrol @string/mcl_setting_title_resolution_scaler - - - opengles2 - opengles2_ptitseb - opengles2_vgpu - opengles2_vgpu_1 - mesa_3d - vulkan_zink - virglrenderer - freedreno - panfrost - opengles3_ltw - @string/global_default diff --git a/app_pojavlauncher/src/main/res/values/pgw_strings.xml b/app_pojavlauncher/src/main/res/values/pgw_strings.xml index 7a1b1088a..add1e125a 100644 --- a/app_pojavlauncher/src/main/res/values/pgw_strings.xml +++ b/app_pojavlauncher/src/main/res/values/pgw_strings.xml @@ -52,8 +52,7 @@ Renderer exp setup Enable Renderer Exp Setup Use more renderer-specific settings - Spare Bridge - Use the second scheme bridge,close if launch failed + Bridge Config Spare frame buffer Use the frame buffer of the second scheme, close it if launch failed Renderer (Extra) diff --git a/app_pojavlauncher/src/main/res/values/renderer_extra.xml b/app_pojavlauncher/src/main/res/values/renderer_extra.xml index a4f01306f..8df778406 100644 --- a/app_pojavlauncher/src/main/res/values/renderer_extra.xml +++ b/app_pojavlauncher/src/main/res/values/renderer_extra.xml @@ -1,5 +1,21 @@ + + @string/global_default + Config 1 + Config 2 + Config 3 + Config 4 + + + + default + xxx1 + xxx2 + xxx3 + xxx4 + + @string/preference_renderer_extra_default Mesa23.2.0-devel diff --git a/app_pojavlauncher/src/main/res/xml/pref_video.xml b/app_pojavlauncher/src/main/res/xml/pref_video.xml index f9dbd8df2..9e605e1b0 100644 --- a/app_pojavlauncher/src/main/res/xml/pref_video.xml +++ b/app_pojavlauncher/src/main/res/xml/pref_video.xml @@ -130,11 +130,10 @@ app2:iconSpaceReserved="false" /> -