Okay, here's my Setup: Logitech Dual Action (USB DirectInput device/plugin) mapped to SC360 (Controller 1/Windows Game Controller 1)
Just a normal 1:1 configuration.
I Saved the Profile as "%appdata%\InputMapper2\profiles\XBox 360 Control.pro"
When I unplug my LDA then plug it back in the SC360 shows DPadUp pressed from the moment I unplug onward (no response to any input on LDA). If I manually remap I can regain control of SC360.
Loading profile does not work, and shows empty mapping.
(I unplug LDA in order to avoid games reading IT as the input controller, specifically Borderlands (1) for Steam on Windows)
I renamed "XBox 360 Control.pro" to "XBox 360 Control.pro.txt" and opened it in Notepad, everything looks right.
I would expect that the profile that was loaded would stay loaded and "re-aquire" "DirectInputControllerInput.inLogitechDualAction" once it was reinserted.
I understand that, but that's not exactly what's happening, as I can see, won't the new instance of "DirectInputControllerInput.inLogitechDualAction" be the same as the old instance? You deserialize on first save, then you run into an indeterminant state on that object, unfortunately, you drop the (temporarily) invalid object. Couldn't you allow the invalid references to remain until they become valid?
Or more accurately, on a device plug event you should reload the current profile, in a non-overwrite method, so the reload is ineffective on already operating controls.
If that is how object references worked then I could but unfortunately instances of objects cannot replace eachother, once an object of type "DirectInputControllerInput.inLogitechDualAction" another of same type can show up, but the instances and thus the objects will never be equal, but there are ways around it, just too complicated for what I have had time for so far.