Change controller input path
-
Hi,
I need to be able to configure controllers to be specific device numbers (so controller X is always /dev/input/js0 or player 1 etc), like this guy's problem:
https://www.reddit.com/r/RetroPie/comments/44z2y1/forcing_controllers_to_js0_js1_js2_etc/Apparently it used to be possible to change device node names with udev rule like this:
http://ubuntuforums.org/showthread.php?t=1595666
but now only works with network cards or something. However it is possible to create a custom symlink of the device node, but then I will need to redirect Retropie to look in a new location to find these symlink controller device nodes.Is it possible to change the location that Retropie looks for controllers/inputs from /dev/input/ to somewhere else? Or any other way to solve this problem?
Cheers
-
I've beaten my head against this same rock quite a bit myself. What is your end goal here? I ask because there may be a few more options open to you, depending on what it is you're trying to do.
-
I'm making a portable project which will have a constantly connected USB game controller, which will act as player1 when playing single player in portable mode.
However it wil also be used as multiplayer console on TV with HDMI out, and will add a variety of other controllers including Xbox, bluetooth PS3 and one with a 2.4ghz wireless adapter.
In this case the built-in wired USB controller will take lowest priority (if 4 other controllers are used, te USB one will not be)
So i was planning on setting the USB controller to js4, therefore when nothing else is connected it acts as player 1, however when other controllers are added (to js0, js1 etc) they will take priority.I have a script which runs on boot and detecs video mode and can run specific code when it detects it is in HDMI mode, so I could use this for something, but not sure what
-
Is there some kind of configuration GUI/script to dynamically set controller # to player # mapping using "input_playerX_joypad_index = Y" configurations in retroarch?
-
Dynamically, no. At least not that I've ever run across. As you switch between the device being portable and a console, you may simply have to rely on setting the order up manually, which is pretty easy. This of course doesn't mean that what you're looking to do is impossible, but you're likely going to have to develop it yourself.
Seeing as how the USB device can be fully anticipated at a system level, you could have a script activate from a physical toggle switch that could assign it to the player 4 slot. After that, any other controllers should claim the earlier slots when a game is launched. One thing to keep in mind though is that the USB device should be configured to always read as the first eventX device slot to avoid problems with some emulators outside of RetroArch.
-
Yeah i might just do a python script that runs at boot when HDMI is detected and can be used to configure controllers,then start emulationstaiton
-
Using HDMI detection as a trigger is a keen idea.
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.