mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-12-23 16:15:47 +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);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|