RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Does Hotkey/Exit issue a command that can be called by itself?

    Scheduled Pinned Locked Moved Help and Support
    exit buttonexit emulationscript
    6 Posts 2 Posters 362 Views
    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.
    • I
      icebear81
      last edited by

      I know most systems have select/start as the emulator exit, Im trying to determine if there is a call, script, process, etc that is called that can be called directly?

      Use case is, Im working on a linux button listener that that when triggered will do the emulator exit. I already have it mocking sending the start/select keys, but it would be a little bit cleaner if there was a script, or other that could be called.

      I know of the script that traverses child process, but that doesnt seem like it would be how retropie itself would do it ... or is it?

      https://icculus.org/finger/icculus?date=2019-12-27&time=02-04-18

      mituM 1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator @icebear81
        last edited by mitu

        @icebear81 said in Does Hotkey/Exit issue a command that can be called by itself?:

        Use case is, Im working on a linux button listener that that when triggered will do the emulator exit. I already have it mocking sending the start/select keys, but it would be a little bit cleaner if there was a script, or other that could be called.

        Each emulator has its own key/button bindings for exiting. For RetroArch this is configurable and RetroPie configures it as Hotkey + Start - there is no 'script' that runs and stops the emulators like in the example you have below.

        I know of the script that traverses child process, but that doesnt seem like it would be how retropie itself would do it ... or is it?
        https://icculus.org/finger/icculus?date=2019-12-27&time=02-04-18

        What's wrong with this approach ?
        Take a look at triggerhappy - is included by default in Raspbian and can be used to call scripts or do actions when certain buttons/keys are pressed.

        1 Reply Last reply Reply Quote 0
        • I
          icebear81
          last edited by

          walking the process tree (to me) is troublesome. Difficult code to troubelshoot and can be problematic. I was just hoping to something simpler.

          Ill have to look at triggerhappy -- I wonder how much Ive reinvented the wheel ;)

          thanks

          1 Reply Last reply Reply Quote 0
          • I
            icebear81
            last edited by

            Trigger Happy doesnt seem to want to look at my inputs

            thd --dump /dev/input/js*
            Device /dev/input/js0 not suitable.
            Device /dev/input/js1 not suitable.
            Device /dev/input/js2 not suitable.
            Device /dev/input/js3 not suitable.
            pi@retropie-cdaze:~ $ thd --dump /dev/input/js1
            Device /dev/input/js1 not suitable.
            
            1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator
              last edited by

              Try using the (newer) evdev devices - /dev/input/eventX. You can find out which one is bound to your gamepad by looking at /proc/bus/input/devices.

              1 Reply Last reply Reply Quote 0
              • I
                icebear81
                last edited by

                TriggerHappy kicks a$$ .. thanks for pointing it out

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post

                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.