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

@ -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;