mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 07:45:33 +01:00
Android: Fix pointer if game aspect ratio is larger than devices
This commit is contained in:
parent
224b23b979
commit
fc32ec7ffe
@ -53,7 +53,7 @@ public class InputOverlayPointer
|
|||||||
Float gameAR = NativeLibrary.GetGameAspectRatio();
|
Float gameAR = NativeLibrary.GetGameAspectRatio();
|
||||||
aspectAdjusted = gameAR / deviceAR;
|
aspectAdjusted = gameAR / deviceAR;
|
||||||
|
|
||||||
if (gameAR < deviceAR) // Black bars on left/right
|
if (gameAR <= deviceAR) // Black bars on left/right
|
||||||
{
|
{
|
||||||
xAdjusted = true;
|
xAdjusted = true;
|
||||||
Integer gameX = Math.round((float) y * gameAR);
|
Integer gameX = Math.round((float) y * gameAR);
|
||||||
@ -65,7 +65,7 @@ public class InputOverlayPointer
|
|||||||
else // Bars on top/bottom
|
else // Bars on top/bottom
|
||||||
{
|
{
|
||||||
xAdjusted = false;
|
xAdjusted = false;
|
||||||
Integer gameY = Math.round((float) x * gameAR);
|
Integer gameY = Math.round((float) x / gameAR);
|
||||||
Integer buffer = (y - gameY);
|
Integer buffer = (y - gameY);
|
||||||
|
|
||||||
maxWidth = (float) x / 2;
|
maxWidth = (float) x / 2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user