1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-09-22 13:57:46 +03:00

Better error detection

This commit is contained in:
Anuken 2020-03-07 14:36:47 -05:00
parent c96427c722
commit 8b3d64a29a
2 changed files with 4 additions and 3 deletions

View File

@ -180,9 +180,10 @@ public class DesktopLauncher extends ClientLauncher{
static void handleCrash(Throwable e){
Cons<Runnable> dialog = Runnable::run;
boolean badGPU = false;
String total = Strings.getCauses(e).toString();
if(e.getMessage() != null && (e.getMessage().contains("Couldn't create window") ||
e.getMessage().contains("OpenGL 2.0 or higher") || e.getMessage().toLowerCase().contains("pixel format") || e.getMessage().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() :

View File

@ -1,3 +1,3 @@
org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m
archash=69ef047313449905aff6d1390d7136f9c7cdc986
archash=c1eab295b1a55397957fd54bec2f37daee0e8b4b