From 89c3c2f0caed06b95cfbb593f68e9ede30830cad Mon Sep 17 00:00:00 2001 From: Octol1ttle Date: Sun, 23 Jul 2023 02:22:11 +0500 Subject: [PATCH] Do not show "No Error Context" in video settings if running under Wayland (#1906) Signed-off-by: Octol1ttle --- .../mods/sodium/client/gui/SodiumGameOptionPages.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/jellysquid/mods/sodium/client/gui/SodiumGameOptionPages.java b/src/main/java/me/jellysquid/mods/sodium/client/gui/SodiumGameOptionPages.java index 407bb6a24b..6defffdb21 100644 --- a/src/main/java/me/jellysquid/mods/sodium/client/gui/SodiumGameOptionPages.java +++ b/src/main/java/me/jellysquid/mods/sodium/client/gui/SodiumGameOptionPages.java @@ -11,6 +11,7 @@ import me.jellysquid.mods.sodium.client.gui.options.control.TickBoxControl; import me.jellysquid.mods.sodium.client.gui.options.storage.MinecraftOptionsStorage; import me.jellysquid.mods.sodium.client.gui.options.storage.SodiumOptionsStorage; +import me.jellysquid.mods.sodium.client.util.workarounds.Workarounds; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gl.Framebuffer; import net.minecraft.client.option.*; @@ -314,7 +315,8 @@ public static OptionPage performance() { private static boolean supportsNoErrorContext() { GLCapabilities capabilities = GL.getCapabilities(); - return capabilities.OpenGL46 || capabilities.GL_KHR_no_error; + return (capabilities.OpenGL46 || capabilities.GL_KHR_no_error) + && !Workarounds.isWorkaroundEnabled(Workarounds.Reference.NO_ERROR_CONTEXT_UNSUPPORTED); } public static OptionPage advanced() {