commit b1178f5f3260e236160ebdb4699d70821a5bb1de
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Thu Jan 19 16:55:08 2023 +0100

    Move the control of object scaling out the objectlib.
    Thee xact way the object is scaled needs to be decided in the app, as only the app knows that e.g. in the Rubik main screen, if it is a square, then obejct needs to be a bit smaller than in case of Config screen (if that one happens to be a square)

diff --git a/src/main/java/org/distorted/bandaged/BandagedPlayView.java b/src/main/java/org/distorted/bandaged/BandagedPlayView.java
index ebb6ee41..855bdb3e 100644
--- a/src/main/java/org/distorted/bandaged/BandagedPlayView.java
+++ b/src/main/java/org/distorted/bandaged/BandagedPlayView.java
@@ -40,7 +40,7 @@ public class BandagedPlayView extends GLSurfaceView
       {
       mScreenWidth = width;
       mScreenHeight= height;
-      mObjectController.setScreenSize(width,height);
+      mObjectController.setScreenSizeAndScaling(width,height, Math.min(width, (int)(0.75f*height)) );
       mObjectController.setObjectScale(1.00f);
 
       if( !mCreated )
diff --git a/src/main/java/org/distorted/config/ConfigSurfaceView.java b/src/main/java/org/distorted/config/ConfigSurfaceView.java
index ae09069f..5a4a1173 100644
--- a/src/main/java/org/distorted/config/ConfigSurfaceView.java
+++ b/src/main/java/org/distorted/config/ConfigSurfaceView.java
@@ -36,7 +36,7 @@ public class ConfigSurfaceView extends GLSurfaceView
       {
       mScreenWidth = width;
       mScreenHeight= height;
-      mObjectController.setScreenSize(width,height);
+      mObjectController.setScreenSizeAndScaling(width,height, Math.min(width,height));
       mObjectController.setObjectScale(1.00f);
 
       if( !mCreated )
diff --git a/src/main/java/org/distorted/main/RubikSurfaceView.java b/src/main/java/org/distorted/main/RubikSurfaceView.java
index 517ed315..2ed2a28a 100644
--- a/src/main/java/org/distorted/main/RubikSurfaceView.java
+++ b/src/main/java/org/distorted/main/RubikSurfaceView.java
@@ -44,7 +44,7 @@ public class RubikSurfaceView extends GLSurfaceView
       {
       mScreenWidth = width;
       mScreenHeight= height;
-      mObjectController.setScreenSize(width,height);
+      mObjectController.setScreenSizeAndScaling(width,height, Math.min(width, (int)(0.75f*height)));
 
       if( !mCreated )
         {
diff --git a/src/main/java/org/distorted/overlays/OverlayStars.java b/src/main/java/org/distorted/overlays/OverlayStars.java
index 3bdd4e24..672fd1b4 100644
--- a/src/main/java/org/distorted/overlays/OverlayStars.java
+++ b/src/main/java/org/distorted/overlays/OverlayStars.java
@@ -218,7 +218,7 @@ public class OverlayStars extends OverlayGeneric implements EffectListener
       MeshJoined wholeMesh = new MeshJoined(mesh);
 
       DistortedEffects effects = new DistortedEffects();
-      VertexEffectScale scaleE = new VertexEffectScale(mWidth*0.15f);
+      VertexEffectScale scaleE = new VertexEffectScale(mHeight*0.10f);
       scaleE.setMeshAssociation(1,-1);
       effects.apply(scaleE);
 
@@ -249,7 +249,7 @@ public class OverlayStars extends OverlayGeneric implements EffectListener
       MeshQuad mesh = new MeshQuad();
 
       DistortedEffects effects = new DistortedEffects();
-      float scaleM  = mWidth*0.40f;
+      float scaleM  = mHeight*0.24f;
       Static3D moveM= new Static3D(0,0,1);
       MatrixEffectMove move  = new MatrixEffectMove(moveM);
       MatrixEffectScale scale= new MatrixEffectScale(scaleM);
diff --git a/src/main/java/org/distorted/purchase/PurchaseSurfaceView.java b/src/main/java/org/distorted/purchase/PurchaseSurfaceView.java
index eda71f0a..e8ff3ab0 100644
--- a/src/main/java/org/distorted/purchase/PurchaseSurfaceView.java
+++ b/src/main/java/org/distorted/purchase/PurchaseSurfaceView.java
@@ -33,7 +33,7 @@ public class PurchaseSurfaceView extends GLSurfaceView
 
     void setScreenSize(int width, int height)
       {
-      mObjectController.setScreenSize(width,height);
+      mObjectController.setScreenSizeAndScaling(width,height, Math.min(width,height));
       mObjectController.setObjectScale(1.00f);
 
       if( !mCreated )
diff --git a/src/main/java/org/distorted/tutorials/TutorialSurfaceView.java b/src/main/java/org/distorted/tutorials/TutorialSurfaceView.java
index f7489a3d..9bf13f69 100644
--- a/src/main/java/org/distorted/tutorials/TutorialSurfaceView.java
+++ b/src/main/java/org/distorted/tutorials/TutorialSurfaceView.java
@@ -40,7 +40,7 @@ public class TutorialSurfaceView extends GLSurfaceView
       {
       mScreenWidth = width;
       mScreenHeight= height;
-      mObjectController.setScreenSize(width,height);
+      mObjectController.setScreenSizeAndScaling(width,height, Math.min(width,height));
       mObjectController.setObjectMove( (int)(-0.5f*width*TutorialActivity.BAR_RATIO), 0);
       mObjectController.setObjectScale(0.80f);
 
