Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    Question: Setting controller order/priority via commandline?

    GamePad/GPIO/USB encoder
    setting orderpriority commandline
    2
    2
    301
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Cacodaemon
      Cacodaemon last edited by

      Hello,

      I am the proud owner of a GPi CASE 2, and I have got one problem when connection the case to its docking station.
      The "build in" controller remains on it's slot/position and the controller connected via USB becomes the secondary controller.

      When starting a game it may be uncontrollable until the priority is changed via the UI's controller setting. Which can be confusing, hence the internal controller is named "Xbox 360 Controller" as well as the one connected via USB 😕 .
      I would like to change the controller slots whether it's connected to the docking station or used in handheld mode.

      Is there any kind of CLI for configuring the controller settings, otherwise is there a another approach than messing up the config files?

      I figured out that the controller config get stored in /recalbox/share/system/recalbox.conf and the handheld's controller id is 030000005e0400008e02000014010000, I assume that each GPi CASE 2 controller has the same id.

      grep "Xbox 360 Controller" /recalbox/share/system/recalbox.conf
      emulationstation.pad0=030000005e0400008e02000020010000:Xbox 360 Controller
      emulationstation.pad1=030000005e0400008e02000014010000:Xbox 360 Controller
      

      So my current approach would be to execute a script like this, below (not tested) when connected to the docking station, to swap the controller order:

      /etc/init.d/S31emulationstation stop
      sed -i 's/pad0/pad99/g' /recalbox/share/system/recalbox.conf.bak
      sed -i 's/pad1/pad0/g' /recalbox/share/system/recalbox.conf.bak
      sed -i 's/pad99/pad1/g' /recalbox/share/system/recalbox.conf.bak
      /etc/init.d/S31emulationstation start
      

      Any other ideas how to manage the controller and swap their order?

      Thanks!

      Zing 1 Reply Last reply Reply Quote 0
      • Zing
        Zing Global moderator Translator @Cacodaemon last edited by

        @cacodaemon Sorry, but unfortunately I don't know any other way to switch controls than manually.

        Se a minha resposta foi útil, por favor, dê um voto positivo, clicando na seta para cima logo abaixo da resposta, ao lado de "citar".
        If my answer was helpful, please give a positive feedback by clicking the up arrow below the answer, next to "quote".

        1 Reply Last reply Reply Quote 0
        • Locked by  admin admin 
        • First post
          Last post

        Want to support us ?

        112
        Online

        98.7k
        Users

        28.1k
        Topics

        187.0k
        Posts

        Copyright © 2021 recalbox.com