diff --git a/BizHawk.Emulation.Common/Base Implementations/ControllerDefinition.cs b/BizHawk.Emulation.Common/Base Implementations/ControllerDefinition.cs index fdda94a09b..82cf241074 100644 --- a/BizHawk.Emulation.Common/Base Implementations/ControllerDefinition.cs +++ b/BizHawk.Emulation.Common/Base Implementations/ControllerDefinition.cs @@ -13,11 +13,6 @@ namespace BizHawk.Emulation.Common { public ControllerDefinition() { - BoolButtons = new List(); - FloatControls = new List(); - FloatRanges = new List(); - AxisConstraints = new List(); - CategoryLabels = new Dictionary(); } public ControllerDefinition(ControllerDefinition source) @@ -39,30 +34,30 @@ namespace BizHawk.Emulation.Common /// /// Gets or sets a list of all button types that have a boolean (on/off) value /// - public List BoolButtons { get; set; } + public List BoolButtons { get; set; } = new List(); /// /// Gets a list of all non-boolean types, that can be represented by a numerical value (such as analog controls, stylus coordinates, etc /// - public List FloatControls { get; } + public List FloatControls { get; } = new List(); /// /// Gets a list of all float ranges for each float control (must be one to one with FloatControls) /// FloatRanges include the min/max/default values /// - public List FloatRanges { get; } + public List FloatRanges { get; } = new List(); /// /// Gets the axis constraints that apply artificial constraints to float values /// For instance, a N64 controller's analog range is actually larger than the amount allowed by the plastic that artificially constrains it to lower values /// Axis constraints provide a way to technically allow the full range but have a user option to constrain down to typical values that a real control would have /// - public List AxisConstraints { get; } + public List AxisConstraints { get; } = new List(); /// /// Gets the category labels. These labels provide a means of categorizing controls in various controller display and config screens /// - public Dictionary CategoryLabels { get; } + public Dictionary CategoryLabels { get; } = new Dictionary(); public void ApplyAxisConstraints(string constraintClass, IDictionary floatButtons) {