Fix issues with desktop runtime
This commit is contained in:
parent
aae277ed5d
commit
d262f9c825
|
@ -80,7 +80,8 @@ public class PlatformFilesystem {
|
|||
}
|
||||
}
|
||||
}else {
|
||||
throw new EaglerFileSystemException("Not a file: " + f.getAbsolutePath());
|
||||
logger.warn("Tried to read file that doesn't exist: \"{}\"", f.getAbsolutePath());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -192,6 +192,10 @@ public class PlatformInput {
|
|||
cursorHand = glfwCreateStandardCursor(GLFW_HAND_CURSOR);
|
||||
cursorText = glfwCreateStandardCursor(GLFW_IBEAM_CURSOR);
|
||||
glfwSetCursor(glfwWindow, cursorDefault);
|
||||
|
||||
if(!fullscreen && startupFullscreen) {
|
||||
toggleFullscreen();
|
||||
}
|
||||
}
|
||||
|
||||
public static int getWindowWidth() {
|
||||
|
@ -386,6 +390,7 @@ public class PlatformInput {
|
|||
}
|
||||
|
||||
private static boolean fullscreen = false;
|
||||
private static boolean startupFullscreen = false;
|
||||
private static int[] lastPos = new int[4];
|
||||
|
||||
public static void toggleFullscreen() {
|
||||
|
@ -407,6 +412,10 @@ public class PlatformInput {
|
|||
fullscreen = !fullscreen;
|
||||
}
|
||||
|
||||
public static void setStartupFullscreen(boolean bool) {
|
||||
startupFullscreen = bool;
|
||||
}
|
||||
|
||||
// https://stackoverflow.com/a/31526753
|
||||
private static long getCurrentMonitor(long window) {
|
||||
int nmonitors, i;
|
||||
|
|
|
@ -6,6 +6,7 @@ import javax.swing.UnsupportedLookAndFeelException;
|
|||
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
import net.lax1dude.eaglercraft.v1_8.EagUtils;
|
||||
import net.lax1dude.eaglercraft.v1_8.internal.EnumPlatformANGLE;
|
||||
import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput;
|
||||
import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.ShaderSource;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayManager;
|
||||
|
@ -40,6 +41,20 @@ public class LWJGLEntryPoint {
|
|||
System.err.println("Could not set system look and feel: " + e.toString());
|
||||
}
|
||||
|
||||
boolean hideRenderDocDialog = false;
|
||||
for(int i = 0; i < args.length; ++i) {
|
||||
if(args[i].equalsIgnoreCase("highp")) {
|
||||
ShaderSource.setHighP(true);
|
||||
}
|
||||
if(args[i].equalsIgnoreCase("hide-renderdoc")) {
|
||||
hideRenderDocDialog = true;
|
||||
}
|
||||
if(args[i].equalsIgnoreCase("fullscreen")) {
|
||||
PlatformInput.setStartupFullscreen(true);
|
||||
}
|
||||
}
|
||||
|
||||
if(!hideRenderDocDialog) {
|
||||
LaunchRenderDocDialog lr = new LaunchRenderDocDialog();
|
||||
lr.setLocationRelativeTo(null);
|
||||
lr.setVisible(true);
|
||||
|
@ -49,15 +64,10 @@ public class LWJGLEntryPoint {
|
|||
}
|
||||
|
||||
lr.dispose();
|
||||
}
|
||||
|
||||
getANGLEPlatformFromArgs(args);
|
||||
|
||||
for(int i = 0; i < args.length; ++i) {
|
||||
if(args[i].equalsIgnoreCase("highp")) {
|
||||
ShaderSource.setHighP(true);
|
||||
}
|
||||
}
|
||||
|
||||
RelayManager.relayManager.load(EagRuntime.getStorage("r"));
|
||||
|
||||
if (RelayManager.relayManager.count() <= 0) {
|
||||
|
|
|
@ -2,7 +2,6 @@ package net.lax1dude.eaglercraft.v1_8.internal.lwjgl;
|
|||
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import java.awt.BorderLayout;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTextArea;
|
||||
|
|
|
@ -10,7 +10,6 @@ import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenGenericErrorMessage;
|
|||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.client.resources.ResourcePackRepository;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2024 lax1dude. All Rights Reserved.
|
||||
|
|
|
@ -11,11 +11,9 @@ import java.util.Set;
|
|||
|
||||
import net.lax1dude.eaglercraft.v1_8.internal.PlatformAudio;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftSoundManager;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftSoundManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.IOUtils;
|
||||
import net.lax1dude.eaglercraft.v1_8.ThreadLocalRandom;
|
||||
import net.lax1dude.eaglercraft.v1_8.json.JSONTypeProvider;
|
||||
|
|
|
@ -185,7 +185,7 @@ public class ResourcePackRepository {
|
|||
|
||||
try {
|
||||
this.texturePackIcon = this.reResourcePack.getPackImage();
|
||||
} catch (IOException var2) {
|
||||
} catch (Throwable var2) {
|
||||
logger.error("Failed to load resource pack icon for \"{}\"!", reResourcePack.resourcePackFile);
|
||||
logger.error(var2);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package net.minecraft.command;
|
||||
|
||||
import java.util.List;
|
||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.ThreadLocalRandom;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
|
|
|
@ -4,13 +4,11 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion;
|
||||
import net.lax1dude.eaglercraft.v1_8.ThreadLocalRandom;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayManager;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
import org.teavm.jso.JSBody;
|
||||
import org.teavm.jso.JSObject;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.internal.IClientConfigAdapter;
|
||||
|
|
Loading…
Reference in New Issue
Block a user