mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-10 15:19:24 +07:00
Better JNI error checking (**needs recompilation**)
This commit is contained in:
parent
38ab1473f2
commit
c59a3116ad
@ -3,6 +3,7 @@ package mindustry.desktop;
|
|||||||
import arc.*;
|
import arc.*;
|
||||||
import arc.Files.*;
|
import arc.Files.*;
|
||||||
import arc.backend.sdl.*;
|
import arc.backend.sdl.*;
|
||||||
|
import arc.backend.sdl.jni.*;
|
||||||
import arc.files.*;
|
import arc.files.*;
|
||||||
import arc.func.*;
|
import arc.func.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
@ -11,7 +12,6 @@ import arc.util.*;
|
|||||||
import arc.util.serialization.*;
|
import arc.util.serialization.*;
|
||||||
import club.minnced.discord.rpc.*;
|
import club.minnced.discord.rpc.*;
|
||||||
import com.codedisaster.steamworks.*;
|
import com.codedisaster.steamworks.*;
|
||||||
import io.anuke.arc.backends.sdl.jni.*;
|
|
||||||
import mindustry.*;
|
import mindustry.*;
|
||||||
import mindustry.core.GameState.*;
|
import mindustry.core.GameState.*;
|
||||||
import mindustry.core.*;
|
import mindustry.core.*;
|
||||||
@ -181,13 +181,14 @@ public class DesktopLauncher extends ClientLauncher{
|
|||||||
Cons<Runnable> dialog = Runnable::run;
|
Cons<Runnable> dialog = Runnable::run;
|
||||||
boolean badGPU = false;
|
boolean badGPU = false;
|
||||||
|
|
||||||
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"))){
|
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"))){
|
||||||
|
|
||||||
dialog.get(() -> message(
|
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() :
|
e.getMessage().contains("Couldn't create window") ? "A graphics initialization error has occured! Try to update your graphics drivers:\n" + e.getMessage() :
|
||||||
"Your graphics card does not support OpenGL 2.0!\n" +
|
"Your graphics card does not support OpenGL 2.0 with the framebuffer_object extension!\n" +
|
||||||
"Try to update your graphics drivers.\n\n" +
|
"Try to update your graphics drivers. If this doesn't work, your computer may not support Mindustry.\n\n" +
|
||||||
"(If that doesn't work, your computer just doesn't support Mindustry.)"));
|
"Full message: " + e.getMessage()));
|
||||||
badGPU = true;
|
badGPU = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||||
archash=bff072e2d671c74a32b41353125c2aa6ba8c0314
|
archash=66e5566de0832e721ea552ccd31f0febfb6233d7
|
||||||
|
Loading…
Reference in New Issue
Block a user