Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

Commit 0ee0dfe

Browse files
committed
Fix[glfw]: stubs for getMonitorContentScale
1 parent 5a98a43 commit 0ee0dfe

File tree

1 file changed

+14
-5
lines changed
  • jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw

1 file changed

+14
-5
lines changed

jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,17 +1300,26 @@ public static void glfwGetMonitorPhysicalSize(@NativeType("GLFWmonitor *") long
13001300
*/
13011301

13021302
/** Array version of: {@link #glfwGetMonitorContentScale GetMonitorContentScale} */
1303-
/*
1303+
13041304
public static void glfwGetMonitorContentScale(@NativeType("GLFWmonitor *") long monitor, @Nullable @NativeType("float *") float[] xscale, @Nullable @NativeType("float *") float[] yscale) {
1305-
long __functionAddress = Functions.GetMonitorContentScale;
13061305
if (CHECKS) {
13071306
// check(monitor);
13081307
checkSafe(xscale, 1);
13091308
checkSafe(yscale, 1);
13101309
}
1311-
invokePPPV(monitor, xscale, yscale, __functionAddress);
1310+
xscale[0] = 1;
1311+
yscale[0] = 1;
1312+
}
1313+
1314+
public static void glfwGetMonitorContentScale(@NativeType("GLFWmonitor *") long monitor, @NativeType("float *") @Nullable FloatBuffer xscale, @NativeType("float *") @Nullable FloatBuffer yscale) {
1315+
if (CHECKS) {
1316+
// check(monitor);
1317+
checkSafe(xscale, 1);
1318+
checkSafe(yscale, 1);
1319+
}
1320+
xscale.put(0, 1);
1321+
yscale.put(0, 1);
13121322
}
1313-
*/
13141323

13151324
/** Array version of: {@link #glfwGetWindowPos GetWindowPos} */
13161325
public static void glfwGetWindowPos(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") int[] xpos, @Nullable @NativeType("int *") int[] ypos) {
@@ -1370,7 +1379,7 @@ public static void glfwGetWindowContentScale(@NativeType("GLFWwindow *") long wi
13701379
}
13711380
invokePPPV(window, xscale, yscale, __functionAddress);
13721381
}
1373-
*/
1382+
13741383
13751384
/** Array version of: {@link #glfwGetCursorPos GetCursorPos} */
13761385
public static void glfwGetCursorPos(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("double *") double[] xpos, @Nullable @NativeType("double *") double[] ypos) {

0 commit comments

Comments
 (0)