hid: Various fixes and cleanup (#3326)

* hid: Various fix and cleanup

* Add IsValidNpadIdType

* remove ()
This commit is contained in:
Ac_K 2022-05-08 00:28:54 +02:00 committed by GitHub
parent 50d7ecf76d
commit 92ca1cb0cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 147 additions and 123 deletions

View file

@ -35,5 +35,10 @@ namespace Ryujinx.HLE.HOS.Services.Hid.HidServer
PlayerIndex.Unknown => NpadIdType.Unknown,
_ => throw new ArgumentOutOfRangeException(nameof(index))
};
public static bool IsValidNpadIdType(NpadIdType npadIdType)
{
return npadIdType <= NpadIdType.Player8 || npadIdType == NpadIdType.Handheld || npadIdType == NpadIdType.Unknown;
}
}
}