Skip to content

Commit

Permalink
Merge pull request #7731 from zackhow/point
Browse files Browse the repository at this point in the history
Android: Fix pointer if game aspect ratio is larger than device's
  • Loading branch information
stenzek committed Jan 25, 2019
2 parents 224b23b + fc32ec7 commit af25b9a
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit af25b9a

Please sign in to comment.