From 60fb612678a4251140fd464550c7cb5977d51026 Mon Sep 17 00:00:00 2001 From: Nahuel Lofeudo Date: Sun, 18 Dec 2022 19:04:44 +0000 Subject: [PATCH] Hide mouse pointer --- README.md | 2 +- main.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b71ca43..974f1e9 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ Enable and start the service ``` $ sudo systemctl daemon-reload $ sudo systemctl enable dublinbus-display -$ sudo systemctl start dublinbus-display +$ sudo systemctl start dublinbus-display ``` Restart the system diff --git a/main.py b/main.py index b98fab8..18cc60a 100755 --- a/main.py +++ b/main.py @@ -97,10 +97,11 @@ def clear_screen() -> None: pygame.draw.rect(surface=window, color=COLOR_BACKGROUND, width=0, rect=(0, 0, window.get_width(), window.get_height())) -def init_screen(width: int, height: int) -> pygame.Surface: +def init_screen() -> pygame.Surface: """ Create a Surface to draw on, with the given size, using either X11/Wayland (desktop) or directfb (no desktop) """ pygame.display.init() window = pygame.display.set_mode((0, 0)) + pygame.mouse.set_visible(False) return window @@ -112,7 +113,7 @@ def main(): """ Main method. Initialise graphics context """ pygame.init() - window = init_screen(1920, 720) + window = init_screen() pygame.font.init() font = pygame.font.Font(TEXT_FONT, TEXT_SIZE)