diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2026-07-04 17:48:40 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2026-07-04 17:48:40 +0300 |
| commit | 31815ae3294cc24d3cd435403e49004acf037804 (patch) | |
| tree | cba63951feeabcbe8832a2b6c6129d4231ef5fa4 | |
| parent | 8b011ee5378ec952f4f3571c379dbedd77d576eb (diff) | |
| download | fungus-launcher-31815ae3294cc24d3cd435403e49004acf037804.tar.gz fungus-launcher-31815ae3294cc24d3cd435403e49004acf037804.tar.xz | |
fix splash screen not auto-closing on magic string
| -rw-r--r-- | fungus/game_launcher.py | 5 | ||||
| -rw-r--r-- | fungus/run_manager.py | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/fungus/game_launcher.py b/fungus/game_launcher.py index 3648244..d696fd5 100644 --- a/fungus/game_launcher.py +++ b/fungus/game_launcher.py @@ -563,11 +563,10 @@ class GameLauncher: if self._on_output_line: self._on_output_line(clean_line) - # Check for game-running signals + # Check for game-running signals — signal the adapter to close if self._detect_game_running(clean_line): if self._on_splash_close: - # The adapter handles scheduling via GLib.timeout_add_seconds - pass + self._on_splash_close() log.info("%s", line.rstrip()) diff --git a/fungus/run_manager.py b/fungus/run_manager.py index 2424187..cbb1026 100644 --- a/fungus/run_manager.py +++ b/fungus/run_manager.py @@ -137,6 +137,11 @@ def handle_command( GLib.idle_add(_show_spawn_error, error_msg) def _on_splash_close() -> None: + """Schedule splash window close on the GTK main thread. + + Called from the I/O watch thread when a game-running signal + (e.g. "fsync") is detected in the output. + """ s = splash_container[0] if s is not None and hasattr(s, 'close'): GLib.idle_add(s.close) |
