Change project structure again

This commit is contained in:
Duy Tran Khanh committed 2020-12-31 16:52:58 +07:00
1 parent 3c371a10ed
commit b9b1e76aca
37 files changed
+175 -2025

No files matched your search

@@ -5,15 +5,16 @@ import java.io.*;
import javafx.application.Application;
import org.lwjgl.glfw.CallbackBridge;
/*
import org.robovm.apple.foundation.*;
import org.robovm.apple.uikit.*;
import org.robovm.pods.dialog.*;
*/
import net.kdt.pojavlaunch.prefs.*;
import net.kdt.pojavlaunch.value.*;
public class PLaunchApp extends UIApplicationDelegateAdapter {
public class PLaunchApp /* extends UIApplicationDelegateAdapter */ {
/*
@Override
public boolean didFinishLaunching(UIApplication application,
UIApplicationLaunchOptions launchOptions) {
@@ -39,7 +40,7 @@ public class PLaunchApp extends UIApplicationDelegateAdapter {
return true;
}
*/
public static void main(String[] args) {
/*
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@@ -90,10 +91,31 @@ public class PLaunchApp extends UIApplicationDelegateAdapter {
System.setProperty("prism.mintexturesize", "16");
System.setProperty("prism.static.libraries", "true");
System.setProperty("prism.useNativeIIO", "false");
System.out.println("Starting UI...");
NSAutoreleasePool pool = new NSAutoreleasePool();
UIApplication.main(args, null, PLaunchApp.class);
pool.drain();
CallbackBridge.windowWidth = (int) 1280; // bounds.getWidth();
CallbackBridge.windowHeight = (int) 720; // bounds.getHeight();
JREUtils.saveGLContext();
// Start Minecraft there!
File file = new File(Tools.DIR_GAME_NEW);
file.mkdirs();
String mcver = "1.13";
try {
mcver = Tools.read(Tools.DIR_GAME_HOME + "/config_ver.txt");
} catch (IOException e) {
System.out.println("config_ver.txt not found, defaulting to Minecraft 1.13");
}
MinecraftAccount acc = new MinecraftAccount();
acc.selectedVersion = mcver;
JMinecraftVersionList.Version version = Tools.getVersionInfo(mcver);
try {
Tools.launchMinecraft(acc, version);
} catch (Throwable th) {
Tools.showError(th);
}
}
}
@@ -14,12 +14,12 @@ import net.kdt.pojavlaunch.prefs.*;
import net.kdt.pojavlaunch.utils.*;
import net.kdt.pojavlaunch.value.*;
import org.lwjgl.glfw.*;
/*
import org.robovm.apple.foundation.*;
import org.robovm.apple.uikit.*;
import org.robovm.pods.dialog.*;
import org.robovm.pods.*;
*/
public final class Tools
{
public static final boolean ENABLE_DEV_FEATURES = true; // BuildConfig.DEBUG;
@@ -384,7 +384,7 @@ public final class Tools
pw.flush();
System.err.println(sw.toString());
/*
Platform.getPlatform().runOnUIThread(() -> {
WindowAlertController alertController = new WindowAlertController(title, sw.toString(), UIAlertControllerStyle.Alert);
alertController.addAction(new UIAlertAction("OK",
@@ -397,6 +397,7 @@ public final class Tools
);
alertController.show();
});
*/
}
/*
public static void dialogOnUiThread(final Activity ctx, final CharSequence title, final CharSequence message) {