diff options
Diffstat (limited to 'src/nativewindow/classes/jogamp')
3 files changed, 18 insertions, 18 deletions
diff --git a/src/nativewindow/classes/jogamp/nativewindow/ios/IOSUtil.java b/src/nativewindow/classes/jogamp/nativewindow/ios/IOSUtil.java index bd4b36239..7100cb0b5 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/ios/IOSUtil.java +++ b/src/nativewindow/classes/jogamp/nativewindow/ios/IOSUtil.java @@ -115,18 +115,18 @@ public class IOSUtil implements ToolkitProperties { return (Insets) GetInsets0(windowOrView); } - public static double GetPixelScaleByDisplayID(final int displayID) { - if( 0 != displayID ) { - return GetPixelScale1(displayID); + public static float GetScreenPixelScaleByScreenIdx(final int screenIdx) { + if( 0 <= screenIdx ) { + return GetScreenPixelScale1(screenIdx); } else { - return 1.0; // default + return 1.0f; // default } } - public static double GetPixelScale(final long windowOrView) { + public static float GetScreenPixelScale(final long windowOrView) { if( 0 != windowOrView ) { - return GetPixelScale2(windowOrView); + return GetScreenPixelScale2(windowOrView); } else { - return 1.0; // default + return 1.0f; // default } } @@ -310,8 +310,8 @@ public class IOSUtil implements ToolkitProperties { private static native boolean isUIWindow0(long object); private static native Object GetLocationOnScreen0(long windowOrView, int src_x, int src_y); private static native Object GetInsets0(long windowOrView); - private static native double GetPixelScale1(int displayID); - private static native double GetPixelScale2(long windowOrView); + private static native float GetScreenPixelScale1(int screenIdx); + private static native float GetScreenPixelScale2(long windowOrView); private static native long CreateUIWindow0(int x, int y, int width, int height); private static native void DestroyUIWindow0(long uiWindow); private static native long GetCALayer0(long uiView); diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java index 3b824cfe4..0f4a70ddc 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java +++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java @@ -592,7 +592,7 @@ public class JAWTUtil { final Object res = getCGDisplayIDMethodOnOSX.invoke(device); if (res instanceof Integer) { final int displayID = ((Integer)res).intValue(); - sx = (float) OSXUtil.GetPixelScaleByDisplayID(displayID); + sx = OSXUtil.GetScreenPixelScaleByDisplayID(displayID); sy = sx; } } catch (final Throwable t) {} diff --git a/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java b/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java index b1bf248ce..e93c9574f 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java +++ b/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java @@ -107,18 +107,18 @@ public class OSXUtil implements ToolkitProperties { return (Insets) GetInsets0(windowOrView); } - public static double GetPixelScaleByDisplayID(final int displayID) { + public static float GetScreenPixelScaleByDisplayID(final int displayID) { if( 0 != displayID ) { - return GetPixelScale1(displayID); + return GetScreenPixelScale1(displayID); } else { - return 1.0; // default + return 1.0f; // default } } - public static double GetPixelScale(final long windowOrView) { + public static float GetScreenPixelScale(final long windowOrView) { if( 0 != windowOrView ) { - return GetPixelScale2(windowOrView); + return GetScreenPixelScale2(windowOrView); } else { - return 1.0; // default + return 1.0f; // default } } @@ -404,8 +404,8 @@ public class OSXUtil implements ToolkitProperties { private static native boolean isNSWindow0(long object); private static native Object GetLocationOnScreen0(long windowOrView, int src_x, int src_y); private static native Object GetInsets0(long windowOrView); - private static native double GetPixelScale1(int displayID); - private static native double GetPixelScale2(long windowOrView); + private static native float GetScreenPixelScale1(int displayID); + private static native float GetScreenPixelScale2(long windowOrView); private static native long CreateNSWindow0(int x, int y, int width, int height); private static native void DestroyNSWindow0(long nsWindow); private static native long GetNSView0(long nsWindow); |