You are not logged in.

#1 2015-03-04 20:03:24

PureTryOut
Member
Registered: 2014-09-23
Posts: 64

Games using wrong controller

I have a HOTAS (Saitek X-55) and a Playstation 3 controller (sixaxis) connected to my system. The HOTAS (existing of 2 parts) is connected via usb, the sixaxis via bluetooth.
Now everything is properly recognized, the HOTAS as /dev/input/js0 and /dev/input/js1, and the sixaxis as /dev/input/js2.

Now games (and Steam Big Picture) which don't offer a controller selection screen (like Super Meat Boy or BattleBlock Theater), take the first controller they can find, which is /dev/input/js0.
Sadly this is 1 of the 2 parts of the HOTAS, which is of course not want I want to use.

Now is there a way to lock /dev/input/js0 for the PS3 controller to use, or is there anyway I can make any game ever use a different controller? Thanks in advance!

Offline

#2 2015-03-04 20:26:51

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: Games using wrong controller

According to https://wiki.archlinux.org/index.php/Gamepad you can set an environment variable for sdl games on which joystick to use.

So in your case, you would want to set the following as an environment variable in your shells rc files.  (bash would be ~/.bashrc    zsh would be ~/.zshrc   etc)

SDL_JOYSTICK_DEVICE=/dev/input/js2

HTH


Knute

Offline

#3 2015-03-04 20:50:03

PureTryOut
Member
Registered: 2014-09-23
Posts: 64

Re: Games using wrong controller

Well that did not seem to work. It still takes /dev/input/js0 as default.
~/.bashrc contents:

#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '

SDL_JOYSTICK_DEVICE=/dev/input/js2

I've tried "EXPORT SDL_JOYSTICK_DEVICE=/dev/input/js2" in a terminal, but that did not work either.

Offline

#4 2015-03-04 21:10:31

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: Games using wrong controller

Setting that in the ~/.bashrc would require that you log out and log back in again.

This also presumes that these programs use sdl.


Knute

Offline

#5 2015-03-05 18:33:19

PureTryOut
Member
Registered: 2014-09-23
Posts: 64

Re: Games using wrong controller

Well I even restarted a few times, didn't change anything. I guess these games don't use SDL then...

If I take for example Steam Big Picture, it says it detects my HOTAS throttle. What does Steam use to detect controllers?

Offline

#6 2015-03-05 18:55:57

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: Games using wrong controller

You could try looking at these:

https://support.steampowered.com/kb_art … &l=English
https://support.steampowered.com/kb_art … &l=English

Not sure how relevant they are, as I don't use steam myself.


Knute

Offline

#7 2015-03-05 19:51:07

PureTryOut
Member
Registered: 2014-09-23
Posts: 64

Re: Games using wrong controller

Sadly they won't help. That is just for games using the Source Engine, which Steam Big Picture (of course) and my other games don't use. The Source Engine games I do have don't need a controller.

Offline

#8 2015-03-05 20:03:47

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: Games using wrong controller

After a quick google search, I found this:
http://steamcommunity.com/app/221410/di … 095090885/

This thread contained a reference to qtsixa.

https://aur.archlinux.org/packages/qtsixa/

HTH


Knute

Offline

#9 2015-03-05 20:20:54

PureTryOut
Member
Registered: 2014-09-23
Posts: 64

Re: Games using wrong controller

Aah no I know that one wink
QTSixa is a workaround for a bug which was in Bluez 4.x, which prevented the sixaxis controller to be connected.
However this was fixed somewhere in Bluez 5.x, and the sixaxis controller connects fine. I can use it in programs that have a controller selection screen (the Dolphin Emulator for example).

QTSixa also requires Bluez 4.x, which means I have to downgrade from Bluez 5.28, which I prefer not too.

Offline

#10 2015-03-05 20:30:44

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: Games using wrong controller

There is another thing that I can think of.
What happens if you unplug the joystick that you don't want to use?  Does it detect and use the one that you want?


Knute

Offline

#11 2015-03-05 21:45:53

PureTryOut
Member
Registered: 2014-09-23
Posts: 64

Re: Games using wrong controller

Yup, it uses the correct one. So I guess it just takes /dev/input/js0, without checking if is the right one or not. But clearly a lot of games do this.

Edit: Well I say that, only Steam seems to detect the right one. Games like Super Meat Boy don't even detect a controller at all...

Last edited by PureTryOut (2015-03-05 21:47:05)

Offline

#12 2015-03-30 15:47:40

PureTryOut
Member
Registered: 2014-09-23
Posts: 64

Re: Games using wrong controller

Sadly this is still the case. Even with the environment variable set, games use the wrong controller or don't use a controller at all (for example Meat Boy). Games and programs (such as Dolphin) which allow me to select the controller works fine, so it's no input problem.
Is there anyway I can fix this? Forcing the controller is fine with me if that's even possible.

Offline

Board footer

Powered by FluxBB