suppress mod keys, pass rotate state to game

This commit is contained in:
ohsqueezy 2023-02-20 22:48:06 -05:00
parent f43eb04e36
commit 482d94d925
1 changed files with 4 additions and 1 deletions

View File

@ -73,6 +73,9 @@ class Playzing(pgfw.Game):
self.register(self.reveal_text, interval=40)
self.play(self.animate_logo, play_once=True)
# Don't let modifier keys trigger an any key event
self.input.suppress_any_key_on_mods()
def initialize_gpio(self):
"""
Set pin numbering mode to GPIO, initialize all buttons to input pullup.
@ -181,7 +184,7 @@ class Playzing(pgfw.Game):
if self.delegate.compare(event, "any"):
os.chdir(pathlib.Path("games/ibitfit"))
print(f"current working dir is {os.getcwd()}")
ibitfit = ElectricSieve(suppress_gpio_init=True)
ibitfit = ElectricSieve(suppress_gpio_init=True, rotate=self.rotated)
ibitfit.display.set_screen(dimensions=ibitfit.configuration.get("display", "dimensions"))
ibitfit.run()
os.chdir(pathlib.Path("../.."))