Doom app: show list before starting, even if just one

This commit is contained in:
Thomas Farstrike
2025-12-23 22:52:38 +01:00
parent 4cf031c21d
commit 6039bb4e13
@@ -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}")