Немного разобрал вопрос относительно сабжа. Во многих гоночных играх рули поддерживаются по-разному, а бывает, что и вообще не поддерживаются. В последнем случае сложнее всего.
Для рулей Logitech есть станица в википедии
http://en.wikipedia.org/wiki/List_of_Logitech_Racing_Wheels_compatible_games, хотя тоже не всё гладко:
- Например, в NFS Most Wanted 2005 хотелось бы, чтобы колёса были более отзывчивы к рулю, потому что вертеть его с большой скоростью не очень приятно и удобно.
- В Live for Speed поддержка рулей сделана на 5, потому что игра позволяет настроить все оси и кнопки самому, откалибровать и всё в удобном интерфейсе. Было бы у всех игр так.
- В случае с Euro Track Simulator 2 мы имеем возможност играть в родную "Linuxовую" версию игры, которая позволяет примерно также, как и LFS, настроить оси и кнопки, но пока нет поддержки обратной связи.
Теперь возьмём, к примеру, игру Blur (гонки). В ней нет поддержки руля, но есть поддержка xbox геймпада (мне это показалось немного странным). Тут на помощь приходит эмулятор xbox геймпада
https://code.google.com/p/x360ce/. Он состоит из библиотеки и текстового ini-файла. После очередного "гугления" удалось выяснить, что ребята нашли способ эмулировать xbox геймпад, но со своей библиотекой xinput1_3.dll -
http://gtaforums.com/topic/379477-all-controllers-working/. "Ага, вот эти ребята". Итак, что мы имеем?
- Руль G27 работает в GTA IV
- Руль G27 работает в Blur
Вот пример моего ini-файла:
[Options]
UseAutoPad=1 #use 0 to 1; automatically make other PAD to PAD1 after detecting movement
UseInitBeep=1 #use 0 to 1; default 1; beep on init
#Logitech Cordless Rumblepad 2 / Generic Rumble Controller
[PAD1]
Index=-1 #controller index in game controllers list; 0 is first; -1 to ignore this pad
Left Analog X=1 #axis index; use - to invert; precede with 's' for a slider eg; s-1; 7 to disable
Left Analog Y=-2 #axis index; use - to invert; precede with 's' for a slider eg; s-1; 7 to disable
Right Analog X=3 #axis index; use - to invert; precede with 's' for a slider eg; s-1; 7 to disable
Right Analog Y=-6 #axis index; use - to invert; precede with 's' for a slider eg; s-1; 7 to disable
Left Analog X Linear=0 #-100 to +100 raise this number to increase sensitivity near center
Left Analog Y Linear=0 #-100 to +100 raise this number to increase sensitivity near center
Right Analog X Linear=0 #-100 to +100 raise this number to increase sensitivity near center
Right Analog Y Linear=0 #-100 to +100 raise this number to increase sensitivity near center
Left Analog X+ Button=0 #button id; 0 to disable
Left Analog X- Button=0 #button id; 0 to disable
Left Analog Y+ Button=0 #button id; 0 to disable
Left Analog Y- Button=0 #button id; 0 to disable
Right Analog X+ Button=0 #button id; 0 to disable
Right Analog X- Button=0 #button id; 0 to disable
Right Analog Y+ Button=0 #button id; 0 to disable
Right Analog Y- Button=0 #button id; 0 to disable
D-pad POV=1 #POV index; 0 to disable
D-pad Up=0 #button id; 0 to disable
D-pad Down=0 #button id; 0 to disable
D-pad Left=0 #button id; 0 to disable
D-pad Right=0 #button id; 0 to disable
A=2 #button id; 0 to disable
B=3 #button id; 0 to disable
X=1 #button id; 0 to disable
Y=4 #button id; 0 to disable
Left Shoulder=5 #button id; 0 to disable
Right Shoulder=6 #button id; 0 to disable
Back=9 #button id; 0 to disable
Start=10 #button id; 0 to disable
Left Thumb=11 #button id; 0 to disable
Right Thumb=12 #button id; 0 to disable
Left Trigger=7 #button id; precede with 'a' for an axis; eg; a-6; for a slider precede with 's' eg; s-1
Right Trigger=8 #button id; precede with 'a' for an axis; eg; a-6; for a slider precede with 's' eg; s-1
UseForceFeedback=0 #use 0 to 1; default 0
ForceLargeGain=10000 #use 0 to 10000; default 10000; effect intensity
ForceLargePeriod=120000 #use 0 to 200000; default 120000; effect frequency; wheel only
ForceLargeFadeTime=10 #use 0 to 100; default 10
ForceLargeFadeIn=0 #use 0 to 1; default 1
ForceLargeFadeOut=0 #use 0 to 1; default 1
ForceLargeStartMag=0 #use 0 to 10000; default 2000; effect will begin with this value
ForceSmallGain=10000 #use 0 to 10000; default 10000; effect intensity
ForceSmallPeriod=30000 #use 0 to 200000; default 30000; effect frequency; wheel only
ForceSmallFadeTime=10 #use 0 to 100 default 10
ForceSmallFadeIn=0 #use 0 to 1; default 1
ForceSmallFadeOut=0 #use 0 to 1; default 1
ForceSmallStartMag=0 #use 0 to 10000; default 2000; effect will begin with this value
WheelInertiaGain=2500 #use 0 to 10000; default 2500; effect intensity; wheel only
WheelSpringGain=5000 #use 0 to 10000; default 5000; effect intensity; wheel only
SteeringWheel=0 #use 0 to 1; enable for all wheel effects
[PAD2]
Index=-1 #controller index in game controllers list; 0 is first; -1 to ignore this pad
Left Analog X=1 #axis index; use - to invert; precede with 's' for a slider eg; s-1; 7 to disable
Left Analog Y=-2 #axis index; use - to invert; precede with 's' for a slider eg; s-1; 7 to disable
Right Analog X=3 #axis index; use - to invert; precede with 's' for a slider eg; s-1; 7 to disable
Right Analog Y=-6 #axis index; use - to invert; precede with 's' for a slider eg; s-1; 7 to disable
Left Analog X Linear=0 #-100 to +100 raise this number to increase sensitivity near center
Left Analog Y Linear=0 #-100 to +100 raise this number to increase sensitivity near center
Right Analog X Linear=0 #-100 to +100 raise this number to increase sensitivity near center
Right Analog Y Linear=0 #-100 to +100 raise this number to increase sensitivity near center
Left Analog X+ Button=0 #button id; 0 to disable
Left Analog X- Button=0 #button id; 0 to disable
Left Analog Y+ Button=0 #button id; 0 to disable
Left Analog Y- Button=0 #button id; 0 to disable
Right Analog X+ Button=0 #button id; 0 to disable
Right Analog X- Button=0 #button id; 0 to disable
Right Analog Y+ Button=0 #button id; 0 to disable
Right Analog Y- Button=0 #button id; 0 to disable
D-pad POV=1 #POV index; 0 to disable
D-pad Up=0 #button id; 0 to disable
D-pad Down=0 #button id; 0 to disable
D-pad Left=0 #button id; 0 to disable
D-pad Right=0 #button id; 0 to disable
A=2 #button id; 0 to disable
B=3 #button id; 0 to disable
X=1 #button id; 0 to disable
Y=4 #button id; 0 to disable
Left Shoulder=5 #button id; 0 to disable
Right Shoulder=6 #button id; 0 to disable
Back=9 #button id; 0 to disable
Start=10 #button id; 0 to disable
Left Thumb=11 #button id; 0 to disable
Right Thumb=12 #button id; 0 to disable
Left Trigger=7 #button id; precede with 'a' for an axis; eg; a-6; for a slider precede with 's' eg; s-1
Right Trigger=8 #button id; precede with 'a' for an axis; eg; a-6; for a slider precede with 's' eg; s-1
UseForceFeedback=0 #use 0 to 1; default 0
ForceLargeGain=10000 #use 0 to 10000; default 10000; effect intensity
ForceLargePeriod=120000 #use 0 to 200000; default 120000; effect frequency; wheel only
ForceLargeFadeTime=10 #use 0 to 100; default 10
ForceLargeFadeIn=0 #use 0 to 1; default 1
ForceLargeFadeOut=0 #use 0 to 1; default 1
ForceLargeStartMag=0 #use 0 to 10000; default 2000; effect will begin with this value
ForceSmallGain=10000 #use 0 to 10000; default 10000; effect intensity
ForceSmallPeriod=30000 #use 0 to 200000; default 30000; effect frequency; wheel only
ForceSmallFadeTime=10 #use 0 to 100 default 10
ForceSmallFadeIn=0 #use 0 to 1; default 1
ForceSmallFadeOut=0 #use 0 to 1; default 1
ForceSmallStartMag=0 #use 0 to 10000; default 2000; effect will begin with this value
WheelInertiaGain=2500 #use 0 to 10000; default 2500; effect intensity; wheel only
WheelSpringGain=5000 #use 0 to 10000; default 5000; effect intensity; wheel only
SteeringWheel=0 #use 0 to 1; enable for all wheel effects
#Примечания
#Номера осей и кнопок отличаются от тех, что указаны в jstest-gtk, и начинаются с единицы, а не с нуля.
#За движение машины вперёд отвечает Left Shoulder, а Left Analog Y только поднимает и опускает камеру при вождении.
#Logitech G25 Racing Wheel / Generic Wheel
[PAD3]
Index=1 #controller index in game controllers list; 0 is first; -1 to ignore this pad
Left Analog X=1 #axis index; use - to invert; precede with 's' for a slider eg; s-1; 7 to disable
Left Analog Y=0 #axis index; use - to invert; precede with 's' for a slider eg; s-1; 7 to disable
Right Analog X=0 #axis index; use - to invert; precede with 's' for a slider eg; s-1; 7 to disable
Right Analog Y=0 #axis index; use - to invert; precede with 's' for a slider eg; s-1; 7 to disable
Left Analog X Linear=+100 #-100 to +100 raise this number to increase sensitivity near center
Left Analog Y Linear=0 #-100 to +100 raise this number to increase sensitivity near center
Right Analog X Linear=0 #-100 to +100 raise this number to increase sensitivity near center
Right Analog Y Linear=0 #-100 to +100 raise this number to increase sensitivity near center
Left Analog X+ Button=0 #button id; 0 to disable
Left Analog X- Button=0 #button id; 0 to disable
Left Analog Y+ Button=0 #button id; 0 to disable
Left Analog Y- Button=0 #button id; 0 to disable
Right Analog X+ Button=0 #button id; 0 to disable
Right Analog X- Button=0 #button id; 0 to disable
Right Analog Y+ Button=0 #button id; 0 to disable
Right Analog Y- Button=0 #button id; 0 to disable
D-pad POV=1 #POV index; 0 to disable
D-pad Up=0 #button id; 0 to disable
D-pad Down=0 #button id; 0 to disable
D-pad Left=0 #button id; 0 to disable
D-pad Right=0 #button id; 0 to disable
A=0 #button id; 0 to disable
B=0 #button id; 0 to disable
X=0 #button id; 0 to disable
Y=0 #button id; 0 to disable
Left Shoulder=0 #button id; 0 to disable
Right Shoulder=0 #button id; 0 to disable
Back=0 #button id; 0 to disable
Start=0 #button id; 0 to disable
Left Thumb=8 #button id; 0 to disable
Right Thumb=0 #button id; 0 to disable
Left Trigger=a-4 #button id; precede with 'a' for an axis; eg; a-6; precede with 's' for a slider eg; s-1
Right Trigger=a-3 #button id; precede with 'a' for an axis; eg; a-6; precede with 's' for a slider eg; s-1
UseForceFeedback=0 #use 0 to 1; default 0
ForceLargeGain=8000 #use 0 to 10000; default 10000; effect intensity
ForceLargePeriod=120000 #use 0 to 200000; default 120000; effect frequency; wheel only
ForceLargeFadeTime=10 #use 0 to 100; default 10
ForceLargeFadeIn=0 #use 0 to 1; default 1
ForceLargeFadeOut=1 #use 0 to 1; default 1
ForceLargeStartMag=1000 #use 0 to 10000; default 2000; effect will begin with this value and end with 10000
ForceSmallGain=8000 #use 0 to 10000; default 10000; effect intensity
ForceSmallPeriod=30000 #use 0 to 200000; default 30000; effect frequency; wheel only
ForceSmallFadeTime=10 #use 0 to 100; default 10
ForceSmallFadeIn=0 #use 0 to 1; default 1
ForceSmallFadeOut=1 #use 0 to 1; default 1
ForceSmallStartMag=1000 #use 0 to 10000; default 2000; effect will begin with this value and end with 10000
WheelInertiaGain=2500 #use 0 to 10000; default 2500; effect intensity; wheel only
WheelSpringGain=5000 #use 0 to 10000; default 5000; effect intensity; wheel only
SteeringWheel=1 #use 0 to 1; enable for all wheel effects
Пояснение: здесь я не стал особо изменять ini-файл ребят с сайта gtaforums, поэтому много лишнего, но данные настройки работают с GTA IV и Blur. Осталась нерешённой одна проблема и пара вопросов:
- Как могут некоторые уже знать, при игре в гонки на xbox геймпаде колёса начинают поворачиваться при значительном отклонении аналогового стика. То есть нам как бы проще отклонить, например, на 30-40% влево или вправо, если мы хотим слегка повернуть, но не до упора. В результате гонки ориентированные на xbox геймпад плохо чувствуют центр. При игре на руле это заметно. Как видно из ini-файла опция "Left Analog X Linear" позволяет это компенсировать, но слабо. Проблема остаётся открытой.
- С библиотекой xinput1_3.dll от автора на code.google ни GTA IV, ни Blur не хотят запускаться, а от "ребят" запускается, причём их библиотека видит ini-файл с именем "xbox360cemu.ini", а не "x360ce.ini" (автора на code.google). Вопрос: почему не работает code.google-вская библиотка?
P.S. Маленький tip: тестировать игровые контроллеры в Linuxе можно программой jstest-gtk.
[/list]