adapt to screen size
This commit is contained in:
parent
fdf1b42aae
commit
d9ef830042
1 changed files with 4 additions and 1 deletions
|
@ -36,6 +36,9 @@ namespace Ryujinx
|
||||||
JoystickPosition LeftJoystick;
|
JoystickPosition LeftJoystick;
|
||||||
JoystickPosition RightJoystick;
|
JoystickPosition RightJoystick;
|
||||||
|
|
||||||
|
float XScaleFactor = (1280 / (float)Width);
|
||||||
|
float YScaleFactor = (720 / (float)Height);
|
||||||
|
|
||||||
Touches CurrentTouchPoints = new Touches()
|
Touches CurrentTouchPoints = new Touches()
|
||||||
{
|
{
|
||||||
XTouches = new uint[Touches.Hid_Max_Num_Touches],
|
XTouches = new uint[Touches.Hid_Max_Num_Touches],
|
||||||
|
@ -98,7 +101,7 @@ namespace Ryujinx
|
||||||
{
|
{
|
||||||
if (Mouse.GetState().LeftButton == OpenTK.Input.ButtonState.Pressed && Focused)
|
if (Mouse.GetState().LeftButton == OpenTK.Input.ButtonState.Pressed && Focused)
|
||||||
{
|
{
|
||||||
CurrentTouchPoints.AddTouch((uint)Mouse.X, (uint)Mouse.Y);
|
CurrentTouchPoints.AddTouch((uint)(Mouse.X * XScaleFactor), (uint)(Mouse.Y * YScaleFactor));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue