mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-10 15:19:24 +07:00
OpenGL error tweaks
This commit is contained in:
parent
69323707cc
commit
7f0134c78f
@ -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;
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
org.gradle.daemon=true
|
||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||
archash=670ff2275995a11566a81a9cdaeb1468e7cf2042
|
||||
archash=04b670f22169ae9e268458950a5d324b5ed03e23
|
||||
|
Loading…
Reference in New Issue
Block a user