mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-13 18:26:39 +00:00
36 lines
866 B
C#
36 lines
866 B
C#
|
using System;
|
|||
|
|
|||
|
namespace Ryujinx.Input.HLE
|
|||
|
{
|
|||
|
public class InputManager : IDisposable
|
|||
|
{
|
|||
|
public IGamepadDriver KeyboardDriver { get; private set; }
|
|||
|
public IGamepadDriver GamepadDriver { get; private set; }
|
|||
|
|
|||
|
public InputManager(IGamepadDriver keyboardDriver, IGamepadDriver gamepadDriver)
|
|||
|
{
|
|||
|
KeyboardDriver = keyboardDriver;
|
|||
|
GamepadDriver = gamepadDriver;
|
|||
|
}
|
|||
|
|
|||
|
public NpadManager CreateNpadManager()
|
|||
|
{
|
|||
|
return new NpadManager(KeyboardDriver, GamepadDriver);
|
|||
|
}
|
|||
|
|
|||
|
protected virtual void Dispose(bool disposing)
|
|||
|
{
|
|||
|
if (disposing)
|
|||
|
{
|
|||
|
KeyboardDriver?.Dispose();
|
|||
|
GamepadDriver?.Dispose();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void Dispose()
|
|||
|
{
|
|||
|
Dispose(true);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|