mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-09 20:29:11 +00:00
Fix Mistakes
This commit is contained in:
parent
0a4a1f0f49
commit
502705b915
1 changed files with 4 additions and 34 deletions
|
@ -75,25 +75,15 @@ namespace Ryujinx.HLE.Input
|
||||||
this.HidPosition = HidPosition;
|
this.HidPosition = HidPosition;
|
||||||
|
|
||||||
Device.Memory.FillWithZeros(HidPosition, Horizon.HidSize);
|
Device.Memory.FillWithZeros(HidPosition, Horizon.HidSize);
|
||||||
|
|
||||||
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void ShMemUnmap(object sender, EventArgs e)
|
private void Init()
|
||||||
{
|
|
||||||
HSharedMem SharedMem = (HSharedMem)sender;
|
|
||||||
|
|
||||||
lock (ShMemLock)
|
|
||||||
{
|
|
||||||
ShMemPositions = SharedMem.GetVirtualPositions();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Init(AMemory Memory, long Position)
|
|
||||||
{
|
{
|
||||||
if (HidEmulatedDevices.Devices.Handheld != -2)
|
if (HidEmulatedDevices.Devices.Handheld != -2)
|
||||||
{
|
{
|
||||||
InitializeJoyconPair(
|
InitializeJoyconPair(
|
||||||
Memory,
|
|
||||||
Position,
|
|
||||||
HidControllerId.CONTROLLER_HANDHELD,
|
HidControllerId.CONTROLLER_HANDHELD,
|
||||||
HidControllerType.ControllerType_Handheld,
|
HidControllerType.ControllerType_Handheld,
|
||||||
JoyConColor.Body_Neon_Red,
|
JoyConColor.Body_Neon_Red,
|
||||||
|
@ -105,8 +95,6 @@ namespace Ryujinx.HLE.Input
|
||||||
if (HidEmulatedDevices.Devices.Player1 != -2)
|
if (HidEmulatedDevices.Devices.Player1 != -2)
|
||||||
{
|
{
|
||||||
InitializeJoyconPair(
|
InitializeJoyconPair(
|
||||||
Memory,
|
|
||||||
Position,
|
|
||||||
HidControllerId.CONTROLLER_PLAYER_1,
|
HidControllerId.CONTROLLER_PLAYER_1,
|
||||||
HidControllerType.ControllerType_JoyconPair,
|
HidControllerType.ControllerType_JoyconPair,
|
||||||
JoyConColor.Body_Neon_Red,
|
JoyConColor.Body_Neon_Red,
|
||||||
|
@ -118,8 +106,6 @@ namespace Ryujinx.HLE.Input
|
||||||
if (HidEmulatedDevices.Devices.Player2 != -2)
|
if (HidEmulatedDevices.Devices.Player2 != -2)
|
||||||
{
|
{
|
||||||
InitializeJoyconPair(
|
InitializeJoyconPair(
|
||||||
Memory,
|
|
||||||
Position,
|
|
||||||
HidControllerId.CONTROLLER_PLAYER_2,
|
HidControllerId.CONTROLLER_PLAYER_2,
|
||||||
HidControllerType.ControllerType_JoyconPair,
|
HidControllerType.ControllerType_JoyconPair,
|
||||||
JoyConColor.Body_Neon_Red,
|
JoyConColor.Body_Neon_Red,
|
||||||
|
@ -131,8 +117,6 @@ namespace Ryujinx.HLE.Input
|
||||||
if (HidEmulatedDevices.Devices.Player3 != -2)
|
if (HidEmulatedDevices.Devices.Player3 != -2)
|
||||||
{
|
{
|
||||||
InitializeJoyconPair(
|
InitializeJoyconPair(
|
||||||
Memory,
|
|
||||||
Position,
|
|
||||||
HidControllerId.CONTROLLER_PLAYER_3,
|
HidControllerId.CONTROLLER_PLAYER_3,
|
||||||
HidControllerType.ControllerType_JoyconPair,
|
HidControllerType.ControllerType_JoyconPair,
|
||||||
JoyConColor.Body_Neon_Red,
|
JoyConColor.Body_Neon_Red,
|
||||||
|
@ -144,8 +128,6 @@ namespace Ryujinx.HLE.Input
|
||||||
if (HidEmulatedDevices.Devices.Player4 != -2)
|
if (HidEmulatedDevices.Devices.Player4 != -2)
|
||||||
{
|
{
|
||||||
InitializeJoyconPair(
|
InitializeJoyconPair(
|
||||||
Memory,
|
|
||||||
Position,
|
|
||||||
HidControllerId.CONTROLLER_PLAYER_4,
|
HidControllerId.CONTROLLER_PLAYER_4,
|
||||||
HidControllerType.ControllerType_JoyconPair,
|
HidControllerType.ControllerType_JoyconPair,
|
||||||
JoyConColor.Body_Neon_Red,
|
JoyConColor.Body_Neon_Red,
|
||||||
|
@ -157,8 +139,6 @@ namespace Ryujinx.HLE.Input
|
||||||
if (HidEmulatedDevices.Devices.Player5 != -2)
|
if (HidEmulatedDevices.Devices.Player5 != -2)
|
||||||
{
|
{
|
||||||
InitializeJoyconPair(
|
InitializeJoyconPair(
|
||||||
Memory,
|
|
||||||
Position,
|
|
||||||
HidControllerId.CONTROLLER_PLAYER_5,
|
HidControllerId.CONTROLLER_PLAYER_5,
|
||||||
HidControllerType.ControllerType_JoyconPair,
|
HidControllerType.ControllerType_JoyconPair,
|
||||||
JoyConColor.Body_Neon_Red,
|
JoyConColor.Body_Neon_Red,
|
||||||
|
@ -170,8 +150,6 @@ namespace Ryujinx.HLE.Input
|
||||||
if (HidEmulatedDevices.Devices.Player6 != -2)
|
if (HidEmulatedDevices.Devices.Player6 != -2)
|
||||||
{
|
{
|
||||||
InitializeJoyconPair(
|
InitializeJoyconPair(
|
||||||
Memory,
|
|
||||||
Position,
|
|
||||||
HidControllerId.CONTROLLER_PLAYER_6,
|
HidControllerId.CONTROLLER_PLAYER_6,
|
||||||
HidControllerType.ControllerType_JoyconPair,
|
HidControllerType.ControllerType_JoyconPair,
|
||||||
JoyConColor.Body_Neon_Red,
|
JoyConColor.Body_Neon_Red,
|
||||||
|
@ -183,8 +161,6 @@ namespace Ryujinx.HLE.Input
|
||||||
if (HidEmulatedDevices.Devices.Player7 != -2)
|
if (HidEmulatedDevices.Devices.Player7 != -2)
|
||||||
{
|
{
|
||||||
InitializeJoyconPair(
|
InitializeJoyconPair(
|
||||||
Memory,
|
|
||||||
Position,
|
|
||||||
HidControllerId.CONTROLLER_PLAYER_7,
|
HidControllerId.CONTROLLER_PLAYER_7,
|
||||||
HidControllerType.ControllerType_JoyconPair,
|
HidControllerType.ControllerType_JoyconPair,
|
||||||
JoyConColor.Body_Neon_Red,
|
JoyConColor.Body_Neon_Red,
|
||||||
|
@ -196,8 +172,6 @@ namespace Ryujinx.HLE.Input
|
||||||
if (HidEmulatedDevices.Devices.Player8 != -2)
|
if (HidEmulatedDevices.Devices.Player8 != -2)
|
||||||
{
|
{
|
||||||
InitializeJoyconPair(
|
InitializeJoyconPair(
|
||||||
Memory,
|
|
||||||
Position,
|
|
||||||
HidControllerId.CONTROLLER_PLAYER_8,
|
HidControllerId.CONTROLLER_PLAYER_8,
|
||||||
HidControllerType.ControllerType_JoyconPair,
|
HidControllerType.ControllerType_JoyconPair,
|
||||||
JoyConColor.Body_Neon_Red,
|
JoyConColor.Body_Neon_Red,
|
||||||
|
@ -209,8 +183,6 @@ namespace Ryujinx.HLE.Input
|
||||||
if (HidEmulatedDevices.Devices.PlayerUnknown != -2)
|
if (HidEmulatedDevices.Devices.PlayerUnknown != -2)
|
||||||
{
|
{
|
||||||
InitializeJoyconPair(
|
InitializeJoyconPair(
|
||||||
Memory,
|
|
||||||
Position,
|
|
||||||
HidControllerId.CONTROLLER_UNKNOWN,
|
HidControllerId.CONTROLLER_UNKNOWN,
|
||||||
HidControllerType.ControllerType_JoyconPair,
|
HidControllerType.ControllerType_JoyconPair,
|
||||||
JoyConColor.Body_Neon_Red,
|
JoyConColor.Body_Neon_Red,
|
||||||
|
@ -221,8 +193,6 @@ namespace Ryujinx.HLE.Input
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitializeJoyconPair(
|
private void InitializeJoyconPair(
|
||||||
AMemory Memory,
|
|
||||||
long Position,
|
|
||||||
HidControllerId ControllerId,
|
HidControllerId ControllerId,
|
||||||
HidControllerType Type,
|
HidControllerType Type,
|
||||||
JoyConColor LeftColorBody,
|
JoyConColor LeftColorBody,
|
||||||
|
@ -230,7 +200,7 @@ namespace Ryujinx.HLE.Input
|
||||||
JoyConColor RightColorBody,
|
JoyConColor RightColorBody,
|
||||||
JoyConColor RightColorButtons)
|
JoyConColor RightColorButtons)
|
||||||
{
|
{
|
||||||
long BaseControllerOffset = Position + HidControllersOffset + (int)ControllerId * HidControllerSize;
|
long BaseControllerOffset = HidPosition + HidControllersOffset + (int)ControllerId * HidControllerSize;
|
||||||
|
|
||||||
bool IsHalf = false;
|
bool IsHalf = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue