GPIO buttons
parent
617edd50e5
commit
ac9c5cdf4c
@ -1,3 +1,3 @@
|
||||
[submodule "lib/pgfw"]
|
||||
path = lib/pgfw
|
||||
url = makar:/var/www/git/pgfw
|
||||
url = https://git.nugget.fun/nugget/pgfw
|
||||
|
@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys, os
|
||||
|
||||
def ignore_sighup():
|
||||
"""
|
||||
Ignore hangup signal (that is thrown when launching from systemd?).
|
||||
Taken from https://stackoverflow.com/questions/57205271/how-to-display-pygame-framebuffer-using-systemd-service
|
||||
"""
|
||||
import signal
|
||||
def handler(signum, frame):
|
||||
pass
|
||||
signal.signal(signal.SIGHUP, handler)
|
||||
|
||||
# Change directory to the directory of the program launching the script (usually this script "OPEN-GAME").
|
||||
if "--go-to-dir" in sys.argv:
|
||||
os.chdir(os.path.dirname(sys.argv[0]))
|
||||
|
||||
# Use the KMS video driver. This works for newer versions of Raspberry Pi with the KMS overlay
|
||||
# enabled, SDL 2, and Pygame 2.
|
||||
os.putenv("SDL_VIDEODRIVER", "kmsdrm")
|
||||
# ignore_sighup()
|
||||
|
||||
from electric_sieve.ElectricSieve import ElectricSieve
|
||||
|
||||
ElectricSieve().run()
|
@ -1 +1 @@
|
||||
Subproject commit 314b722528a65e6f0053f8be1844c2d8818319f4
|
||||
Subproject commit 24b5d7c6e7c7f17ec09ddb3de2127c092aa6f874
|
Loading…
Reference in New Issue