diff options
author | Sven Gothel <[email protected]> | 2019-07-08 04:55:28 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2019-07-08 04:55:28 +0200 |
commit | f74e9c1597612edbff81425d4f2f528da5ebaf43 (patch) | |
tree | c45eaf4828f3a74b5066ed0f2e5dc8bf238364dc /src/nativewindow/native/macosx/OSXmisc.m | |
parent | a307ab505ed3fb5fe64f01478ce6d2933cd26c7d (diff) |
iOS / MacOS: PixelScale Update
- IOSUtil/OSXUtil: Return float value and refine name to GetScreenPixelScale*
- WindowDriver's updateMaxScreenPixelScaleByDisplayID(..) and updateMaxScreenPixelScaleByWindowHandle(..)
will only update the maxPixelScale, as actual user pixelSize change should not be triggered here.
A user pixelSize adaption to the changed underlying scale capabilities (e.g. switch monitor)
should be supported by the implemented WindowDriver's: updatePixelScale(..) called by native code.
Diffstat (limited to 'src/nativewindow/native/macosx/OSXmisc.m')
-rw-r--r-- | src/nativewindow/native/macosx/OSXmisc.m | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nativewindow/native/macosx/OSXmisc.m b/src/nativewindow/native/macosx/OSXmisc.m index fb15c43b9..1135c5fb2 100644 --- a/src/nativewindow/native/macosx/OSXmisc.m +++ b/src/nativewindow/native/macosx/OSXmisc.m @@ -266,10 +266,10 @@ JNIEXPORT jobject JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_GetInsets0 /* * Class: Java_jogamp_nativewindow_macosx_OSXUtil - * Method: GetPixelScale1 - * Signature: (I)D + * Method: GetScreenPixelScale1 + * Signature: (I)F */ -JNIEXPORT jdouble JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_GetPixelScale1 +JNIEXPORT jfloat JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_GetScreenPixelScale1 (JNIEnv *env, jclass unused, jint displayID) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; @@ -285,15 +285,15 @@ NS_ENDHANDLER } [pool release]; - return (jdouble)pixelScale; + return (jfloat)pixelScale; } /* * Class: Java_jogamp_nativewindow_macosx_OSXUtil - * Method: GetPixelScale1 - * Signature: (J)D + * Method: GetScreenPixelScale1 + * Signature: (J)F */ -JNIEXPORT jdouble JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_GetPixelScale2 +JNIEXPORT jfloat JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_GetScreenPixelScale2 (JNIEnv *env, jclass unused, jlong winOrView) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; @@ -324,7 +324,7 @@ NS_ENDHANDLER [pool release]; - return (jdouble)pixelScale; + return (jfloat)pixelScale; } /* |