Site Login

This Months Donations

$1.64
of $500.00 goal
Server, CDN, Network, Licensing
Development Budget
Developers Beer Fund
Recent:
Gabriel Pena
$2.00
Jon
$10.00
Nikita
$2.00
Gregory McCoy
$2.00
Karl Scahill
$2.00
Number of donations
1
Highest donation
$2.00
Average donation
$2.00

Profile unsync on Input device reconnect

3 years 5 months ago - 3 years 5 months ago #1 by Gregory Smith
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.

Please Log in or Create an account to join the conversation.

3 years 5 months ago #2 by Wobbles
Its a bug, deserializing to object references that do not exist yet is a tricky thing, still working on the code to get that to work.

Please Log in or Create an account to join the conversation.

3 years 5 months ago #3 by Gregory Smith
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.

Please Log in or Create an account to join the conversation.

3 years 5 months ago #4 by Wobbles
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.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum