Lower mem usage and other changes

This commit is contained in:
Stossy11 2024-12-07 00:07:01 +11:00
parent 11ec203e9f
commit 31b10799a3
9 changed files with 62 additions and 82 deletions

View file

@ -31,7 +31,7 @@ namespace Ryujinx.Headless.SDL2
// Input
[Option("correct-ons-controller", Required = false, Default = false, HelpText = "Makes the on-screen controller (iOS) buttons correspond to what they show.")]
[Option("correct-controller", Required = false, Default = false, HelpText = "Makes the on-screen controller (iOS) buttons correspond to what they show.")]
public bool OnScreenCorrespond { get; set; }
[Option("input-profile-1", Required = false, HelpText = "Set the input profile in use for Player 1.")]

View file

@ -143,7 +143,10 @@ namespace Ryujinx.Headless.SDL2
{
List<GamepadInfo> gamepads = new List<GamepadInfo>();
IGamepad gamepad;
_inputManager = new InputManager(new SDL2KeyboardDriver(), new SDL2GamepadDriver());
if (_inputManager == null)
{
_inputManager = new InputManager(new SDL2KeyboardDriver(), new SDL2GamepadDriver());
}
// Collect gamepads from the keyboard driver
foreach (string id in _inputManager.KeyboardDriver.GamepadsIds)
@ -417,7 +420,10 @@ namespace Ryujinx.Headless.SDL2
_accountManager = new AccountManager(_libHacHorizonManager.RyujinxClient, option.UserProfile);
_userChannelPersistence = new UserChannelPersistence();
_inputManager = new InputManager(new SDL2KeyboardDriver(), new SDL2GamepadDriver());
if (_inputManager == null)
{
_inputManager = new InputManager(new SDL2KeyboardDriver(), new SDL2GamepadDriver());
}
GraphicsConfig.EnableShaderCache = true;