The root problem appeared to be that KeyValuePair<> is no longer supported by System.Xml.Serialization, preventing the configured presets from being persisted after exiting a flight scene.
My solution removes the KeyValuePair<> types from the serialization lists, and replaces them with custom classes that contain the same information. Additionally, I consolidated the ContinuousActionsInv mappings with the ContinuousActions mappings because the custom classes remove the limitation of a 1-to-1 association with KeyValuePair<> types.
Note: This change is not backwards compatible with previous controller presets. Users will have to reconfigure their controllers if these changes are merged. I've tested that an old configuration file will not cause failures for the mod during deserialization, but all the button and axis bindings will be removed.
If backwards compatibility is a concern, I believe I could make that happen, but it likely wont be a trivial task.
Associated with issue #19
The root problem appeared to be that
KeyValuePair<>
is no longer supported bySystem.Xml.Serialization
, preventing the configured presets from being persisted after exiting a flight scene.My solution removes the
KeyValuePair<>
types from the serialization lists, and replaces them with custom classes that contain the same information. Additionally, I consolidated theContinuousActionsInv
mappings with theContinuousActions
mappings because the custom classes remove the limitation of a 1-to-1 association withKeyValuePair<>
types.Note: This change is not backwards compatible with previous controller presets. Users will have to reconfigure their controllers if these changes are merged. I've tested that an old configuration file will not cause failures for the mod during deserialization, but all the button and axis bindings will be removed.
If backwards compatibility is a concern, I believe I could make that happen, but it likely wont be a trivial task.