Hi Frank,
....I'm not familiar with Mint (apart from PVR/HTPC distros based on that),
so just be aware there may be differences wrt me talking here about CLFS or Deb6...
...and to be honest, I haven't given this a second thought as to the 'why' of it,
but my other meanderings with joysticks in wine means I should revisit it all...
...the analog module is a linux kernel module - you don't need to find it ; if
you poke at it with modinfo, it should return thusly;
bash-3.2$ /sbin/modinfo analog
filename: /lib/modules/2.6.34/kernel/drivers/input/joystick/analog.ko
license: GPL
description: Analog joystick and gamepad driver
author: Vojtech Pavlik <vojtech@ucw.cz>
depends:
vermagic: 2.6.34 SMP preempt mod_unload
parm: map:Describes analog joysticks type/capabilities (array of charp)
..the last line there is what I speak of. The functionality/mapping happens automatically
as the device is initiated, as dictated by device entries (if present) in the input
driver layer ; if no specific device entry is found (and we're pretty sure it's really
a joystick), it gets cast the 'generic' mapping for the 'basic' HID device types. That
is to say a '2 axis/4button' joystick or what-have-you. What can happen, is a piece of
hardware gets mapped like this, but it's not really appropriate due to the HID design
(or how they've mapped things in hardware)...
...on the wine side, these mappings are interpreted into directx namespace...umm...
static const char *axis_names[] = {"X", "Y", "Z", "Rx", "Ry", "Rz",
"Slider1", "Slider2",
"POV1", "POV2", "POV3", "POV4"};
..etc etc. Buttons are similarly mapped to namespace Button0, 1, 2 ..blabla (or is
it Btn0??...), whatever, I'm sure you ge the idea. Now, what can happen, is that
thing you call 'main fire button', may actually be defaultly mapped to say Button8
(because that's where the linux driver layer found/enumerated it). but IL-2 (apart
from probably never expecting to see more than 'x' buttons) may have that mapped to
another function (or oblivion if it's not coded to handle more than 4 buttons), and
ergo it doesn't work. What you want to do (or need to happen), is tell the linux
analog module to map button8 to button0 instead, so it's actually appearing (to the
game) where it should be....
...and that was probably where I left it, in trying to map the xbox controller to IL-2 =)
In that situation, all sort of weird things happen..for example...(//my comment indented);
bash-3.2$ jscal /dev/js0
Joystick has 8 axes and 10 buttons.
//X axis ; Joy1
Correction for axis 0 is broken line, precision is 16.
Coeficients are: -128, 128, 16513, 16513
//Y axis ; Joy1
Correction for axis 1 is broken line, precision is 16.
Coeficients are: -128, 128, 16513, 16513
//Right trigger (ugh)
Correction for axis 2 is broken line, precision is 0.
Coeficients are: 127, 127, 4227330, 4227330
...in IL-2, X & Y are fine, but it 'sees' the next axis and maps it to where I would have
the -other- joystick defined for flight controls, and if you were to imagine an xbox analog
trigger mapped to ailerons (which iirc is what it did), you end up having to fly the plane
with your finger constantly holding the right trigger centered to maintain level flight =)
note other games do things like this too when confronted with a xpad...
...I'll aside some time this weekend to have a closer look at things - I've been meaning to
do it anyhow since I bought a USB 6channel R/C flight controller HID ... 8)
Cheers!