From ba981553a335b56bb9949ba2ab7f8f2ed8b53b2a Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sun, 5 Jun 2022 16:24:05 -0400 Subject: [PATCH] v1.3.0: fixed some additional errors with desktop crash popup --- .../shatteredpixeldungeon/desktop/DesktopLauncher.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopLauncher.java b/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopLauncher.java index 838905f83..36ac9b912 100644 --- a/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopLauncher.java +++ b/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopLauncher.java @@ -86,8 +86,13 @@ public class DesktopLauncher { exceptionMsg = exceptionMsg.replace("com.watabou.", ""); exceptionMsg = exceptionMsg.replace("com.badlogic.gdx.", ""); exceptionMsg = exceptionMsg.replace("\t", " "); + exceptionMsg = exceptionMsg.replace("'", ""); - if (exceptionMsg.contains("Couldn't create window")){ + if (exceptionMsg.length() > 500){ + exceptionMsg = exceptionMsg.substring(0, 500) + "..."; + } + + if (exceptionMsg.contains("Couldnt create window")){ TinyFileDialogs.tinyfd_messageBox(title + " Has Crashed!", title + " was not able to initialize its graphics display, sorry about that!\n\n" + "This usually happens when your graphics card does not support OpenGL 2.0+, or has misconfigured graphics drivers.\n\n" +