Does Hotkey/Exit issue a command that can be called by itself?
-
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
-
@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-18What's wrong with this approach ?
Take a look attriggerhappy
- is included by default in Raspbian and can be used to call scripts or do actions when certain buttons/keys are pressed. -
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
-
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.
-
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
. -
TriggerHappy kicks a$$ .. thanks for pointing it out
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.