Skip to content
Permalink
Browse files

Android: Fix pointer if game aspect ratio is larger than devices

  • Loading branch information...
zackhow committed Jan 25, 2019
1 parent 224b23b commit fc32ec7ffed770ed7b3fe121147c07ae0b481cd6
@@ -53,7 +53,7 @@ public InputOverlayPointer(Context context, int button)
Float gameAR = NativeLibrary.GetGameAspectRatio();
aspectAdjusted = gameAR / deviceAR;

if (gameAR < deviceAR) // Black bars on left/right
if (gameAR <= deviceAR) // Black bars on left/right
{
xAdjusted = true;
Integer gameX = Math.round((float) y * gameAR);
@@ -65,7 +65,7 @@ public InputOverlayPointer(Context context, int button)
else // Bars on top/bottom
{
xAdjusted = false;
Integer gameY = Math.round((float) x * gameAR);
Integer gameY = Math.round((float) x / gameAR);
Integer buffer = (y - gameY);

maxWidth = (float) x / 2;

0 comments on commit fc32ec7

Please sign in to comment.
You can’t perform that action at this time.