2013-11-04 01:39:19 +00:00
|
|
|
|
namespace BizHawk.Emulation.Common
|
2011-01-11 02:55:51 +00:00
|
|
|
|
{
|
2016-12-14 15:11:07 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// A empty implementation of IController that represents the lack of
|
|
|
|
|
/// a controller interface
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <seealso cref="IController" />
|
2011-08-08 23:35:13 +00:00
|
|
|
|
public class NullController : IController
|
|
|
|
|
{
|
2016-12-17 05:34:18 +00:00
|
|
|
|
private static readonly ControllerDefinition _definition = new ControllerDefinition
|
|
|
|
|
{
|
|
|
|
|
Name = "Null Controller"
|
|
|
|
|
};
|
|
|
|
|
|
2016-12-14 15:16:54 +00:00
|
|
|
|
public ControllerDefinition Definition
|
|
|
|
|
{
|
2016-12-17 05:34:18 +00:00
|
|
|
|
get { return _definition; }
|
2016-12-14 15:16:54 +00:00
|
|
|
|
}
|
2011-01-11 02:55:51 +00:00
|
|
|
|
|
2016-12-14 15:16:54 +00:00
|
|
|
|
public bool this[string button]
|
|
|
|
|
{
|
|
|
|
|
get { return false; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool IsPressed(string button)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float GetFloat(string name)
|
|
|
|
|
{
|
|
|
|
|
return 0f;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static NullController Instance = new NullController();
|
2011-08-08 23:35:13 +00:00
|
|
|
|
}
|
2011-01-11 02:55:51 +00:00
|
|
|
|
}
|