OpenGL error tweaks

This commit is contained in:
Anuken 2020-03-27 09:27:30 -04:00
parent 69323707cc
commit 7f0134c78f
2 changed files with 5 additions and 5 deletions

View File

@ -180,16 +180,16 @@ public class DesktopLauncher extends ClientLauncher{
static void handleCrash(Throwable e){
Cons<Runnable> 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;
}

View File

@ -1,3 +1,3 @@
org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m
archash=670ff2275995a11566a81a9cdaeb1468e7cf2042
archash=04b670f22169ae9e268458950a5d324b5ed03e23