Skip to content

Commit 6039bb4

Browse files
Doom app: show list before starting, even if just one
1 parent 4cf031c commit 6039bb4

File tree

1 file changed

+6
-6
lines changed
  • internal_filesystem/apps/com.micropythonos.doom/assets

1 file changed

+6
-6
lines changed

internal_filesystem/apps/com.micropythonos.doom/assets/doom.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,6 @@ def refresh_wad_list(self):
102102
print("No WAD files found")
103103
return
104104

105-
# If only one WAD file, auto-start it
106-
if len(all_wads) == 1:
107-
print(f"refresh_wad_list: Only one WAD file found, auto-starting: {all_wads[0]}")
108-
self.start_wad_file(all_wads[0])
109-
return
110-
111105
# Populate list with WAD files
112106
print(f"refresh_wad_list: Populating list with {len(all_wads)} WAD files")
113107
self.status_label.set_text(f"Listed files in: {self.bootfile_prefix + self.doomdir}")
@@ -118,6 +112,12 @@ def refresh_wad_list(self):
118112
button = self.wadlist.add_button(None, button_text)
119113
button.add_event_cb(lambda e, f=wad_file: self.start_wad_file(f), lv.EVENT.CLICKED, None)
120114

115+
# If only one WAD file, auto-start it
116+
if len(all_wads) == 1:
117+
print(f"refresh_wad_list: Only one WAD file found, auto-starting: {all_wads[0]}")
118+
self.start_wad_file(all_wads[0])
119+
return
120+
121121
def start_wad_file(self, wad_file):
122122
"""Start a WAD file (called from list selection or auto-start)"""
123123
print(f"start_wad_file: WAD file selected: {wad_file}")

0 commit comments

Comments
 (0)