From 0ee0dfecc20e6db2deea7f6da111ff07ecc3b9f4 Mon Sep 17 00:00:00 2001 From: artdeell Date: Tue, 4 Feb 2025 18:46:53 +0300 Subject: [PATCH] Fix[glfw]: stubs for getMonitorContentScale --- .../src/main/java/org/lwjgl/glfw/GLFW.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java b/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java index 53ea33596a..685e7ac989 100644 --- a/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java +++ b/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java @@ -1300,17 +1300,26 @@ public static void glfwGetMonitorPhysicalSize(@NativeType("GLFWmonitor *") long */ /** Array version of: {@link #glfwGetMonitorContentScale GetMonitorContentScale} */ -/* + public static void glfwGetMonitorContentScale(@NativeType("GLFWmonitor *") long monitor, @Nullable @NativeType("float *") float[] xscale, @Nullable @NativeType("float *") float[] yscale) { - long __functionAddress = Functions.GetMonitorContentScale; if (CHECKS) { // check(monitor); checkSafe(xscale, 1); checkSafe(yscale, 1); } - invokePPPV(monitor, xscale, yscale, __functionAddress); + xscale[0] = 1; + yscale[0] = 1; + } + + public static void glfwGetMonitorContentScale(@NativeType("GLFWmonitor *") long monitor, @NativeType("float *") @Nullable FloatBuffer xscale, @NativeType("float *") @Nullable FloatBuffer yscale) { + if (CHECKS) { + // check(monitor); + checkSafe(xscale, 1); + checkSafe(yscale, 1); + } + xscale.put(0, 1); + yscale.put(0, 1); } -*/ /** Array version of: {@link #glfwGetWindowPos GetWindowPos} */ 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 } invokePPPV(window, xscale, yscale, __functionAddress); } -*/ + /** Array version of: {@link #glfwGetCursorPos GetCursorPos} */ public static void glfwGetCursorPos(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("double *") double[] xpos, @Nullable @NativeType("double *") double[] ypos) {