Rework mapping save format
Right now the mappings are just crudely converted to text and saved in an ini file. A typical XOutput binding usually looks something like this:
[bf964500-f65b-11e3-8001-444553540000]
AAEAAgAAAAMgACEAIgAjAAAGAAcABAAFAAoACwAMAAkACBABEAAQBRAC
The first part in the square brackets is the GUID of the controller. The second line is the mapping converted to text. In the future I would like it to look something more like this:
[bf964500-f65b-11e3-8001-444553540000]
left_trigger=ax1
right_trigger=ax1
a_button=btn1
up=dpd_up
I have one suggestion on this, maybe do it on a profile basis, so you can share profile files for specific controllers and then link them to ID's later on?
I'm not quite sure what you mean. Do you mean like saving each controller binding in its own file?
Yeah, exactly, then you also avoid duplicates and make it easily shareable.
That would work. Configs would then be sorted by their device name rather than their GUID. I actually noticed currently it sorts it by instance GUID which is unique to each computer, meaning configs aren't transferable right now.
Then you could tie config files with GUID's in the ini file or something like that. Also I noticed that the GUID changes if you unbind and re-bind the controller?
Alright, in 0ec47c1 the new format is pretty much fully implemented. I just need to clean some of the code up and add work on the error handling.
The new format saves files named after their device in a folder named "configs". The files just contain the left_trigger=axis1 type stuff, do we really need any more than that?
Sounds good, just checked out the correct revision, but it's getting late so I will try and get compiling set up tomorrow and test.
Also might want to do some trailing spaces clipping:
And for the use of the configs, maybe we make it so that you can select a config, so for example if several controllers are built on the same chipset, you can just have one config and use it with all controllers? Also I think ipega calls all their controllers the same as in the screenshot, might be other companies doing the same, so this might also be a potential issue of not letting people choose a profile
- @KrisZane
Yeah, I can have it trim. I'd like the config file names to be easily identifiable but at the same time I want each controller to have a unique config. As for controllers on similar chipsets, I'm gonna have to investigate the types of data I can get from the controller.
Neat, I was actually reworking the saveManager a bit to add the trim and add a device overview ini file, I can send you what I got so far? :P
Yeah, sure.
I can't really seem to find a way to actually add it though, maybe using a fork or something? It won't allow me to paste documents. :/
Also I didn't get far, so might be easier to just do it. :P
You can just fork it and send a pull request
Can't get my private key to work right now for whatever ungodly reason, so I will give it a go tomorrow if I have time. :)
So now I added a pull request, I don't have my controller with me at work though, so I can't test it out unfortunately, but the code compiles and seems to be sound.
I've tested the new .ini format: loading/saving seems OK :) actually I've started to debug the app because x360ce seems to show fake button names in their UI, I discovered than xOutput does the job for my Saitek p26000 gamepad. thank you
