diff options
Diffstat (limited to 'src/splitscreen_duo/__init__.py')
| -rw-r--r-- | src/splitscreen_duo/__init__.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/splitscreen_duo/__init__.py b/src/splitscreen_duo/__init__.py index aa0aeda..6a93cbd 100644 --- a/src/splitscreen_duo/__init__.py +++ b/src/splitscreen_duo/__init__.py @@ -1,17 +1,24 @@ from . import menu import os import logging +import pygame +from .serial import Serial -logger = logging.getLogger(__name__) +def main() -> int: + logger = logging.getLogger(__name__) + pygame.init() -def main() -> int: + serial = Serial(os.getenv("SERIAL_DEVICE", "/dev/null"), 115200) + INSTANCE = os.getenv("INSTANCE", "Unknown") + + pygame.display.set_caption(f"SplitScreen Duo Menu ({INSTANCE})") logging.basicConfig( level=(logging.DEBUG if os.getenv("DEVELOPMENT", "").lower() else logging.INFO) ) print("The Dual Screen Console") logger.info(f"Running as {os.getenv("INSTANCE", "unknown")}") - menu.main_loop() + menu.main_loop(serial, INSTANCE) return 0 |