changeset 2687:42ff9d95e87b

Android: Fix the logic error, had height and width reversed in bitfields.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 27 Oct 2021 23:26:44 +0000
parents 95f61d3f3d0d
children c359cbd0b20f
files android/DWindows.kt android/dw.cpp
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/android/DWindows.kt	Wed Oct 27 22:00:31 2021 +0000
+++ b/android/DWindows.kt	Wed Oct 27 23:26:44 2021 +0000
@@ -1254,7 +1254,7 @@
                 val slider = window as SeekBar
 
                 // If the widget is rotated, swap width and height
-                if(slider.rotation != 270F && slider.rotation != 90F) {
+                if(slider.rotation == 270F || slider.rotation == 90F) {
                     retval = height.toLong() or (width.toLong() shl 32)
                 }
             }
--- a/android/dw.cpp	Wed Oct 27 22:00:31 2021 +0000
+++ b/android/dw.cpp	Wed Oct 27 23:26:44 2021 +0000
@@ -5809,9 +5809,9 @@
             if(_dw_jni_check_exception(env))
                 dimensions = 0;
             if(width)
-                *width = (int)((dimensions >> 32) & 0xFFFF);
+                *width = (int)(dimensions & 0xFFFF);
             if(height)
-                *height = (int)(dimensions & 0xFFFF);
+                *height = (int)((dimensions >> 32) & 0xFFFF);
         }
         else
         {