From 7f0134c78f530a1964405a35b218915835c7774c Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 27 Mar 2020 09:27:30 -0400 Subject: [PATCH] OpenGL error tweaks --- desktop/src/mindustry/desktop/DesktopLauncher.java | 8 ++++---- gradle.properties | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/desktop/src/mindustry/desktop/DesktopLauncher.java b/desktop/src/mindustry/desktop/DesktopLauncher.java index 7b5f824db2..b7080bbea8 100644 --- a/desktop/src/mindustry/desktop/DesktopLauncher.java +++ b/desktop/src/mindustry/desktop/DesktopLauncher.java @@ -180,16 +180,16 @@ public class DesktopLauncher extends ClientLauncher{ static void handleCrash(Throwable e){ Cons dialog = Runnable::run; boolean badGPU = false; + String finalMessage = Strings.getFinalMesage(e); String total = Strings.getCauses(e).toString(); - if(total.contains("Couldn't create window") || - total.contains("OpenGL 2.0 or higher") || total.toLowerCase().contains("pixel format") || total.contains("GLEW")){ + if(total.contains("Couldn't create window") || total.contains("OpenGL 2.0 or higher") || total.toLowerCase().contains("pixel format") || total.contains("GLEW")){ dialog.get(() -> message( - e.getMessage().contains("Couldn't create window") ? "A graphics initialization error has occured! Try to update your graphics drivers:\n" + e.getMessage() : + total.contains("Couldn't create window") ? "A graphics initialization error has occured! Try to update your graphics drivers:\n" + finalMessage : "Your graphics card does not support OpenGL 2.0 with the framebuffer_object extension!\n" + "Try to update your graphics drivers. If this doesn't work, your computer may not support Mindustry.\n\n" + - "Full message: " + Strings.getCauses(e).map(t -> t.getMessage() == null ? "" : t.getMessage()).toString("\n"))); + "Full message: " + finalMessage)); badGPU = true; } diff --git a/gradle.properties b/gradle.properties index 32a3974fb7..0f5f52d1e8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=670ff2275995a11566a81a9cdaeb1468e7cf2042 +archash=04b670f22169ae9e268458950a5d324b5ed03e23