Fixes for Spiral Knights

This commit is contained in:
artdeell 2022-08-08 22:32:01 +03:00
parent 23e8a6338f
commit aa8bfdd518
2 changed files with 6 additions and 5 deletions

View File

@ -19,8 +19,7 @@ public static int getControllerCount() {
ctrlr.poll(); ctrlr.poll();
} }
public static boolean next() { public static boolean next() {
ctrlr.poll(); return false;
return true;
} }
public static boolean isCreated() { public static boolean isCreated() {
return true; return true;

View File

@ -953,7 +953,7 @@ public class Display {
} else { } else {
glfwSetWindowIcon(Window.handle, new GLFWImage.Buffer(icons[0])); glfwSetWindowIcon(Window.handle, new GLFWImage.Buffer(icons[0]));
} }
} catch (NullPointerException e) { } catch (Exception e) {
LWJGLUtil.log("Couldn't set icon"); LWJGLUtil.log("Couldn't set icon");
e.printStackTrace(); e.printStackTrace();
} }
@ -986,8 +986,10 @@ public class Display {
} }
public static void setDisplayModeAndFullscreen(DisplayMode dm) throws LWJGLException { public static void setDisplayModeAndFullscreen(DisplayMode dm) throws LWJGLException {
Display.mode = dm; if(Window.handle != 0) {
GLFW.glfwSetWindowSize(Window.handle, dm.getWidth(), dm.getHeight()); Display.mode = dm;
GLFW.glfwSetWindowSize(Window.handle, dm.getWidth(), dm.getHeight());
}
} }
public static void setFullscreen(boolean fullscreen) throws LWJGLException { public static void setFullscreen(boolean fullscreen) throws LWJGLException {