0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-22 22:45:46 +00:00

ControllerApplet: Override player counts when SingleMode is set (#3571)

This commit is contained in:
mageven 2022-08-15 13:16:08 +05:30 committed by GitHub
parent 6dfb6ccf8c
commit 00e35d9bf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,9 +72,16 @@ namespace Ryujinx.HLE.HOS.Applets
int playerMin = argHeader.PlayerCountMin;
int playerMax = argHeader.PlayerCountMax;
bool singleMode = argHeader.EnableSingleMode != 0;
Logger.Stub?.PrintStub(LogClass.ServiceHid, $"ControllerApplet Arg {playerMin} {playerMax} {argHeader.EnableTakeOverConnection} {argHeader.EnableSingleMode}");
if (singleMode)
{
// Applications can set an arbitrary player range even with SingleMode, so clamp it
playerMin = playerMax = 1;
}
int configuredCount = 0;
PlayerIndex primaryIndex = PlayerIndex.Unknown;
while (!_system.Device.Hid.Npads.Validate(playerMin, playerMax, (ControllerType)privateArg.NpadStyleSet, out configuredCount, out primaryIndex))