Controller index
-
In the 'Example Per System Control Override retroarch.cfg:' section of https://github.com/RetroPie/RetroPie-Setup/wiki/RetroArch-Configuration it mentions input_player1_joypad_index = 0
How do you set a controller with an index number? And how do you make sure that the controller keeps that index?
-
it's to do with which USB port they are connected to. This video has some information
-
Thanks @BuZz, do you know where a wireless gamepad would would be indexed? And is the 0,1,2,3 above the same as js0, js1, js2, js3?
-
With wireless dongle or bluetooth ? The first would map the port it's in, but not sure about bluetooth - you will have to experiment. In regards to js0/js1 I think so - but you will have to test again.
-
@BuZz Yeah, i meant one completely unassociated with a USB port - bluetooth, on a pi3b running 3.8.
I like testing, but i'm quite lost here, I don't know a file i can look at that will tell me which pad has which index when attached.
-
This may help
ls -la /dev/input/by-id/
ls -la /dev/input/by-path/
-
Thanks again. I think I have found it in there, although it isn't labelled like a wired controller is labelled.
this is from /opt/retropie/configs/all/emulationstation/es_input.cfg
<inputConfig type="joystick" deviceName="Nintendo Wii Remote Pro Controller" deviceGUID="050000007e0500003003000001000000">
and then
pi@retropie:~/RetroPie $ udevadm info -q all -n /dev/input/js1
P: /devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:11/0005:057E:0330.0 004/input/input3/js1
N: input/js1
E: DEVNAME=/dev/input/js1
E: DEVPATH=/devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:11/0005:057 E:0330.0004/input/input3/js1
E: ID_FOR_SEAT=input-platform-soc
E: ID_INPUT=1
E: ID_INPUT_JOYSTICK=1
E: ID_INPUT_KEY=1
E: ID_PATH=platform-soc
E: ID_PATH_TAG=platform-soc
E: MAJOR=13
E: MINOR=1
E: SUBSYSTEM=input
E: TAGS=:seat:uaccess:
E: USEC_INITIALIZED=966569718Those 2 ID's look similar enough - deviceGUID="050000007e0500003003000001000000" and 0005:057E:0330.0 - so i'm guessing that's it.
-
@matalog maybe you like it:
http://github.com/meleu/Retropie-input-selectionIt's an easy way to choose which controller will be the input for each player. It doesn't care about connections (usb, bluetooth, etc).
-
@matalog said in Controller index:
How do you set a controller with an index number? And how do you make sure that the controller keeps that index?
If you find out how to do it, please let me know! ;-)
This would make easy to configure a per system input profile... -
@matalog said in Controller index:
And is the 0,1,2,3 above the same as js0, js1, js2, js3?
Usually yes, but not necessarily.
Example:
Three usb controllers plugged plus a bluetooth controller.
Let's say the usb controls are js0, js1, js2. The bluetooth is js3. For retroarch this is 0, 1 , 2 and 3, respectively.
Later I exit RetroArch and unplug the js2 usb controller. The bluetooth control continues to be the js3, but when you go back to RetroArch the bluetooth will be at the index 2. -
Thanks for the info!
You might like this http://ubuntuforums.org/showthread.php?t=1595666
and https://www.reddit.com/r/RetroPie/comments/31d774/question_how_do_i_force_a_controller_to_be_player/
-
@matalog these are interesting solutions. But I think this approach will mess up the input for non-libretro emulators...
I'll do a research when I get enough time. Thanks for the info! -
@matalog Look what I mean with "mess up the input for non-libretro emulators":
https://retropie.org.uk/forum/topic/1757/js0-being-ignored-by-some-emulators -
I have been using this http://github.com/meleu/Retropie-input-selection that you suggested to me, and in game my Wii U Pro controller is always is the first controller, it's great.
Although, if I have a wired controller and my wirreless controller connected - in the runcommand screen that appears just before a game loads, that lets you choose which emulator and video options - my Wii U Pro controller doesn't have any control there. I have to use the wired controller.
Does this mean js0 doesn't have priority until in game or how is the controller that has control on the runcommand screen chosen?
-
@matalog said in Controller index:
I have been using this http://github.com/meleu/Retropie-input-selection that you suggested to me, and in game my Wii U Pro controller is always is the first controller, it's great.
your Wii U controller is the first in RetroArch only. It's not the js0. My script only let you change the input_playerX_joypad_index (player1 for the first controller in RetroArch). It doesn't change the
/dev/input/jsX
order.Although, if I have a wired controller and my wirreless controller connected - in the runcommand screen that appears just before a game loads, that lets you choose which emulator and video options - my Wii U Pro controller doesn't have any control there. I have to use the wired controller.
Does this mean js0 doesn't have priority until in game or how is the controller that has control on the runcommand screen chosen?
I took a look at
runcommand.sh
and found this line of code:__joy2key_dev=$(ls -1 /dev/input/js* 2>/dev/null | head -n1)
This means that runcommand will take the first joystick found in
/dev/input/
, usually it's the js0. If you are using the wired controller for runcommand menu, I think it's your js0.(Sorry if my answer is too technical. I hope it's clear. )
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.