Added new option "exit by pressing plus and minus buttons" to the input section.

This commit is contained in:
Vova
2025-01-08 21:43:18 +10:00
parent 007d3bc045
commit 37b4dd2133
24 changed files with 333 additions and 25 deletions

View File

@@ -200,8 +200,10 @@ namespace Ryujinx.Input.HLE
ReloadConfiguration(inputConfig, enableKeyboard, enableMouse);
}
public void Update(float aspectRatio = 1)
public bool Update(float aspectRatio = 1)
{
bool spetialExit = false;
lock (_lock)
{
List<GamepadInput> hleInputStates = new();
@@ -225,9 +227,9 @@ namespace Ryujinx.Input.HLE
DriverConfigurationUpdate(ref controller, inputConfig);
controller.UpdateUserConfiguration(inputConfig);
controller.Update();
spetialExit = controller.Update(); //hotkey press check
controller.UpdateRumble(_device.Hid.Npads.GetRumbleQueue(playerIndex));
inputState = controller.GetHLEInputState();
inputState.Buttons |= _device.Hid.UpdateStickButtons(inputState.LStick, inputState.RStick);
@@ -315,6 +317,8 @@ namespace Ryujinx.Input.HLE
_device.TamperMachine.UpdateInput(hleInputStates);
}
return spetialExit;
}
internal InputConfig GetPlayerInputConfigByIndex(int index)