Various fixes
- GLFW display mode array, fix 0x0 resolution bug
- OSMesa library (copied back 64f4042)
- Hacks for getting Spiral Knights to launch
- Error is now logged properly
This commit is contained in:
1 parent
1d2d7edaec
commit
ae1c86b113
15 files changed
+104
-236
No files matched your search
@@ -1,6 +1,8 @@
|
||||
package net.kdt.pojavlaunch;
|
||||
|
||||
import java.beans.Beans;
|
||||
import java.io.*;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.*;
|
||||
|
||||
@@ -15,15 +17,20 @@ public class PojavLauncher {
|
||||
private static float currProgress, maxProgress;
|
||||
|
||||
public static void main(String[] args) throws Throwable {
|
||||
/*
|
||||
try {
|
||||
Runtime.getRuntime().exec("/usr/bin/true");
|
||||
} catch (IOException e) {}
|
||||
*/
|
||||
// Skip calling to com.apple.eawt.Application.nativeInitializeApplicationDelegate()
|
||||
Beans.setDesignTime(true);
|
||||
try {
|
||||
// Some places use macOS-specific code, which is unavailable on iOS
|
||||
// In this case, try to get it to use Linux-specific code instead.
|
||||
com.apple.eawt.Application.getApplication();
|
||||
Class clazz = Class.forName("com.apple.eawt.Application");
|
||||
Field field = clazz.getDeclaredField("sApplication");
|
||||
field.setAccessible(true);
|
||||
field.set(null, null);
|
||||
sun.font.FontUtilities.isLinux = true;
|
||||
} catch (Throwable th) {
|
||||
// Not on JRE8, ignore exception
|
||||
//Tools.showError(th);
|
||||
}
|
||||
|
||||
Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
|
||||
|
||||
@@ -321,8 +321,6 @@ public final class Tools
|
||||
e.printStackTrace(pw);
|
||||
pw.flush();
|
||||
|
||||
System.err.println(sw.toString());
|
||||
|
||||
UIKit.showError(title, sw.toString(), exitIfOk);
|
||||
|
||||
/*
|
||||
|
||||
@@ -13,6 +13,9 @@ public class JSONUtils {
|
||||
public static String insertSingleJSONValue(String value, Map<String, String> keyValueMap) {
|
||||
String valueInserted = value;
|
||||
for (Map.Entry<String, String> keyValue : keyValueMap.entrySet()) {
|
||||
if (keyValue.getValue() == null) {
|
||||
keyValue.setValue("");
|
||||
}
|
||||
valueInserted = valueInserted.replace("${" + keyValue.getKey() + "}", keyValue.getValue());
|
||||
}
|
||||
return valueInserted;
|
||||
|
||||
Reference in new issue
Block a user