ソースを参照

updated comment and change comment on default value to 0.

KEVIN-DESKTOP\kevinba 2 年 前
コミット
2251e2e37b

+ 1 - 1
jme3-core/src/main/java/com/jme3/system/AppSettings.java

@@ -1500,7 +1500,7 @@ public final class AppSettings extends HashMap<String, Object> {
      * number is the number in the list of monitors GlfwGetMonitors returns.
      *
      * <p>This setting is used only with LWJGL3, it defines which monitor
-     * to use when creating a OpenGL window. its default value is -1.
+     * to use when creating a OpenGL window. its default value is 0.
      *
      * @param mon the desired monitor used when creating a OpenGL window
      * 

+ 1 - 1
jme3-core/src/main/java/com/jme3/system/MonitorInfo.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2022 jMonkeyEngine
+ * Copyright (c) 2009-2023 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

+ 1 - 1
jme3-core/src/main/java/com/jme3/system/Monitors.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2022 jMonkeyEngine
+ * Copyright (c) 2009-2023 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

+ 1 - 1
jme3-examples/src/main/java/jme3test/app/TestMonitorApp.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2021 jMonkeyEngine
+ * Copyright (c) 2009-2023 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

+ 3 - 3
jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java

@@ -152,6 +152,7 @@ public abstract class LwjglWindow extends LwjglContext implements Runnable {
 
     private Thread mainThread;
 
+    private long monitor = NULL;
     private long window = NULL;
     private int frameRateLimit = -1;
 
@@ -288,7 +289,7 @@ public abstract class LwjglWindow extends LwjglContext implements Runnable {
 
         glfwWindowHint(GLFW_ALPHA_BITS, settings.getAlphaBits());
 
-        long monitor = NULL;
+//        long monitor = NULL;
 
         /** 
          * Let's grab the monitor selected, if not found it will return primaryMonitor.
@@ -920,8 +921,7 @@ public abstract class LwjglWindow extends LwjglContext implements Runnable {
      */
     
     @Override
-    public Monitors getMonitors()
-    {
+    public Monitors getMonitors()  {
        PointerBuffer monitors = glfwGetMonitors();
        long primary = glfwGetPrimaryMonitor();
        Monitors monitorList = new Monitors();