Python Code Stopping During Emulation
-
I'm trying to make a portable RPI game system, somewhat similar to the PiGRRL that adafruit has kits for. I'm making my own code for my custom controls, and everything seems to be functioning correctly until I start a game emulator.
I'm using Python with the uinput module to emulate keyboard strokes with inputs to the GPIO pins. Inside emulationstation, and inside of the standard terminal my code functions correctly and outputs the keystrokes I tell it to. However, when I start a game through emulationstation the Python code just seems to stop working. The keyboard works for controlling the games, but even though my controls are setup to use the same buttons the keyboard is using, nothing happens. After I exit the game the buttons function correctly again.
I'm guessing that possibly when a game is being run some processes are being paused, or something along those lines.
Currently I'm using Raspbian. I'm running both my Python code and emulation station through the terminal, so I'm not running the Python code on startup or anything yet (although after I figure this out that is my next step). I'm running them as follows:
emulationstation & sudo python controls.py
where controls.py is my controller code.
Does anyone have any ideas? Any help is much appreciated!
-
Or it could be related to how retroarch polls for input being incompatible or something. You could start the script from /etc/rc.local to test running it in the background before ES starts etc.
-
maybe this thread has some info for you:
https://retropie.org.uk/forum/topic/2298/raspberry-pi-zero-built-into-a-nes-controller-buttons-won-t-work-in-retroarch-but-do-work-in-emulationstation
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.