mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-12-02 22:38:54 -06:00
fix: read on-card once with the folder facts
The plan rows, plan text and result screen asked on every frame whether the BIOS folder sits on its system's card, scanning the mounted drives each time. A card pulled out while the plan was open moved Check again from under the focus. The answer is now read with the other folder facts at the end of the check.
This commit is contained in:
1 parent
06f87cf957
commit
0d0b6c54b7
7 files changed
+59
-29
No files matched your search
+9
-7
@@ -25129,11 +25129,9 @@ def _tui_card_bound(state: TuiState) -> tuple[str, str] | None:
|
||||
def _on_its_card(state: TuiState) -> bool:
|
||||
"""Whether the BIOS folder is on the SD card of the setup it is for, a
|
||||
system that reads that card alone: room is made there, another folder
|
||||
being one it never reads."""
|
||||
if state.dest is None:
|
||||
return False
|
||||
return on_its_card(state.platform, state.dest,
|
||||
state.card_bound[0] if state.card_bound else "")
|
||||
being one it never reads. Read with the folder facts at the end of the
|
||||
check, so every frame of the plan and the result shows the same rows."""
|
||||
return state.dest is not None and bool(state.facts.get("on_card"))
|
||||
|
||||
|
||||
def _dest_card(state: TuiState) -> Path | None:
|
||||
@@ -29796,9 +29794,13 @@ def _tui_folder_facts(state: TuiState) -> dict:
|
||||
free = None
|
||||
cores = (installed_cores(core_dirs(state.platform, dest))
|
||||
if state.platform in CORE_PLATFORMS else [])
|
||||
# The retroarch.cfg that names dest, said under it on the plan.
|
||||
# The retroarch.cfg that names dest, said under it on the plan. Whether
|
||||
# dest is the card of its system is read here with the rest, never by
|
||||
# a frame: a card pulled out moved the plan rows under the focus.
|
||||
return {"free": free, "writable": _folder_writable(dest), "cores": cores,
|
||||
"config": _retroarch_config_at(dest)}
|
||||
"config": _retroarch_config_at(dest),
|
||||
"on_card": on_its_card(state.platform, dest,
|
||||
state.card_bound[0] if state.card_bound else "")}
|
||||
|
||||
|
||||
def _row_folder(row: TuiRow) -> Path:
|
||||
|
||||
Reference in new issue
Block a user