mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-12 04:53:52 -06:00
fix: credit a core the archive it reads members in
FBNeo reads sm1.sm1 inside neogeo.zip. The site resolved each member entry by its crc32, credited loose copies FBNeo never opens, and no neogeo.zip card named FBNeo. A member entry now resolves through archive_entry as the pack does, and its card names the archive.
This commit is contained in:
1 parent
f24b34c1ef
commit
1b388e3cdc
3 files changed
+51
-8
No files matched your search
@@ -27,6 +27,7 @@ from common import (
|
||||
platform_arg,
|
||||
ProfileSelectionError,
|
||||
_norm_system_id,
|
||||
archive_entry,
|
||||
directory_members,
|
||||
expand_directory_entries,
|
||||
get_mame_clone_map,
|
||||
@@ -545,6 +546,20 @@ class FileConsumers:
|
||||
if member is not entry
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
def entry_target(entry: dict, files: list[dict]) -> tuple[dict, str]:
|
||||
"""The entry a profile entry resolves through, and its destination.
|
||||
|
||||
A ROM read inside an archive is the archive: FBNeo opens sm1.sm1 in
|
||||
neogeo.zip, and resolved by its crc32 it credited a loose copy FBNeo
|
||||
never opens, while no neogeo.zip card named FBNeo. The archive
|
||||
members the profile reads decide between same-named copies, as in
|
||||
the emulator pack and verify.
|
||||
"""
|
||||
if entry.get("archive"):
|
||||
return archive_entry(entry["archive"], files), ""
|
||||
return with_archive_members(entry, files), entry.get("path") or ""
|
||||
|
||||
def add_emulators(self, profiles: dict[str, dict]) -> None:
|
||||
"""Each file a profile entry resolves to, a directory's members included.
|
||||
|
||||
@@ -573,12 +588,7 @@ class FileConsumers:
|
||||
for dest, sha1 in members.items()
|
||||
]
|
||||
else:
|
||||
# The archive members the profile reads decide between
|
||||
# same-named copies, as in the emulator pack and verify.
|
||||
found = [self.sha1_of(
|
||||
with_archive_members(entry, files), entry.get("path") or "",
|
||||
owner=name,
|
||||
)]
|
||||
found = [self.sha1_of(*self.entry_target(entry, files), owner=name)]
|
||||
for sha1 in found:
|
||||
if sha1:
|
||||
self.emulators.setdefault(sha1, set()).add(name)
|
||||
|
||||
Reference in new issue
Block a user