i think i have a good format for the config file...
its pretty straightforward, but i haven't tested it yet, since i'm at work and i don't think it would look very good for me if i were to pull out my little gamepad, right? :hmm:
it looks kinda like this:
Code:
#
# FlightControls Configuration -- JUST AN EXAMPLE
#
# device axes:
# | 1 : x | 2 : y | 3 : z | 4 : rX | 5 : rY | 6 : rZ | 7 : a1 | 8 : a2 |
#
OPEN_CTRLR 0
axis pitch 3
axis yaw 1
axis roll 6
axis main 2
button main+ 4
button main- 6
button rcsmode 2
button killrot 1
a # or ; sign marks a line as comment... it should be case-insensitive and discosider leading and trailing whitespaces from each line....
it doesn't like end-line comments, as it will always read the entire line, unless the first character is one of the two above
but the basic syntax is simple, you have a main key, to determine whether to use the button or axis-mapping function, then a feature identifier, which determines what game command is being set, then the last number is the id of the physical axis or button being mapped...
i might add a few optional trailing numbers to set sensitivity, deadzone and calibration for axes, and repeat-rate and hold/tap modes for buttons
mappings always apply to the last device that was opened, so you can map all your devices this way
hold on, i'll post a features list in a bit...
what do you think?