mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-24 18:47:53 -06:00
fix: accept a size list beside a size window
A profile entry that declares exact sizes and a min_size/max_size window now accepts either, as the code it transcribes does. size_refusal let the exact size outrank the window, so LinApple's ROMs (12288 to 65536 bytes), the ZEsarUX QL ROM (16 KB floor) and MesenCE's BS-X.bin (32 KB floor) were held to the one dump size. Master.dsk lists the two lone sizes the sector image probe also takes. Truth, the core refusal message and the emulator cards read the same rule.
This commit is contained in:
1 parent
4d62c56730
commit
15f913d0ba
11 files changed
+134
-49
No files matched your search
@@ -1223,8 +1223,10 @@ def core_size_refusal(
|
||||
if sized:
|
||||
tests = sorted({check for entry in sized for check in declared_content_checks(entry)})
|
||||
return f"the core's {', '.join(tests)} test turns it away"
|
||||
bounds = (
|
||||
f"{file_entry['size']}" if file_entry.get("size") is not None
|
||||
else f"{file_entry.get('min_size', 0)} to {file_entry.get('max_size', 'any')}"
|
||||
)
|
||||
return f"{size} bytes, the core checks for {bounds}"
|
||||
declared = file_entry.get("size")
|
||||
bounds = [] if declared is None else [str(declared)]
|
||||
multiple = file_entry.get("size_multiple")
|
||||
if multiple or any(file_entry.get(k) is not None for k in ("min_size", "max_size")):
|
||||
window = f"{file_entry.get('min_size', 0)} to {file_entry.get('max_size', 'any')}"
|
||||
bounds.append(f"{window} in multiples of {multiple}" if multiple else window)
|
||||
return f"{size} bytes, the core checks for {' or '.join(bounds)}"
|
||||
Reference in new issue
Block a user