about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2026-07-04 19:00:21 +0300
committerAndrew Dolgov <fox@fakecake.org>2026-07-04 19:00:21 +0300
commit06b8a04342e15411c16e95072f09c26268032a30 (patch)
tree0f72c8802b154a5387c10bd9da0f476d535becf2
parentb0fedba6317d5af1768403d79b2ef61b7d78230b (diff)
downloadfungus-launcher-06b8a04342e15411c16e95072f09c26268032a30.tar.gz
fungus-launcher-06b8a04342e15411c16e95072f09c26268032a30.tar.xz
use our splash for post-launch error dialog
-rw-r--r--fungus/run_manager.py19
1 files changed, 3 insertions, 16 deletions
diff --git a/fungus/run_manager.py b/fungus/run_manager.py
index 61eeada..3c4bd2a 100644
--- a/fungus/run_manager.py
+++ b/fungus/run_manager.py
@@ -123,26 +123,13 @@ def handle_command(
         GLib.idle_add(Gtk.main_quit)
 
     def on_process_fail(exit_code: int, error_output: list[str]) -> None:
-        """Handle a non-zero process exit."""
+        """Handle a non-zero process exit — show error in the splash."""
         log.debug("on_process_fail: exit_code=%d", exit_code)
         s = splash_container[0]
         if s is not None:
-            GLib.idle_add(s._destroy)
-        if error_output:
-            summary = "\n".join(error_output[-20:])
+            GLib.idle_add(s.show_error, exit_code, error_output)
         else:
-            summary = "No error output captured."
-
-        # Use a lambda because GLib.idle_add doesn't support kwargs.
-        GLib.idle_add(
-            lambda: create_error_dialog(
-                title="Fungus Launcher",
-                primary=f"The game exited with code {exit_code}.",
-                secondary="Check the terminal output for details.",
-                error_text=summary,
-                quit_app=True,
-            )
-        )
+            log.warning("Splash unavailable for error display (exit_code=%d)", exit_code)
 
     def on_sandbox_warning(exec_path: str, valid_dirs: list[str]) -> None:
         GLib.idle_add(SandboxWarningDialog, exec_path, valid_dirs)