From 6039bb4e13da613a1e1ed2707847c0c6b9e86677 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Tue, 23 Dec 2025 22:52:38 +0100 Subject: [PATCH] Doom app: show list before starting, even if just one --- .../apps/com.micropythonos.doom/assets/doom.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal_filesystem/apps/com.micropythonos.doom/assets/doom.py b/internal_filesystem/apps/com.micropythonos.doom/assets/doom.py index 4de100b0..46929d2b 100644 --- a/internal_filesystem/apps/com.micropythonos.doom/assets/doom.py +++ b/internal_filesystem/apps/com.micropythonos.doom/assets/doom.py @@ -102,12 +102,6 @@ class Doom(Activity): print("No WAD files found") return - # If only one WAD file, auto-start it - if len(all_wads) == 1: - print(f"refresh_wad_list: Only one WAD file found, auto-starting: {all_wads[0]}") - self.start_wad_file(all_wads[0]) - return - # Populate list with WAD files print(f"refresh_wad_list: Populating list with {len(all_wads)} WAD files") self.status_label.set_text(f"Listed files in: {self.bootfile_prefix + self.doomdir}") @@ -118,6 +112,12 @@ class Doom(Activity): button = self.wadlist.add_button(None, button_text) button.add_event_cb(lambda e, f=wad_file: self.start_wad_file(f), lv.EVENT.CLICKED, None) + # If only one WAD file, auto-start it + if len(all_wads) == 1: + print(f"refresh_wad_list: Only one WAD file found, auto-starting: {all_wads[0]}") + self.start_wad_file(all_wads[0]) + return + def start_wad_file(self, wad_file): """Start a WAD file (called from list selection or auto-start)""" print(f"start_wad_file: WAD file selected: {wad_file}")