mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-23 04:09:08 -05:00
fix: count only the hash changes an export writes
RomM kept hashes the truth contradicts beside the corrected one, RetroDECK kept a cleared md5, Recalbox counted changes on an element it writes back whole, and two record formats counted fills no record could hold.
This commit is contained in:
1 parent
a913fbf539
commit
eac2eaec83
7 files changed
+116
-3
No files matched your search
@@ -98,6 +98,17 @@ class Exporter(BaseExporter):
|
||||
|
||||
return f" <bios {' '.join(attrs)} />"
|
||||
|
||||
def states(self, fe: NativeFile, field_name: str) -> bool:
|
||||
"""An element it cannot rewrite is written back as Recalbox wrote it.
|
||||
|
||||
es_bios.xsd makes md5 required: an entry whose md5 the truth
|
||||
contradicts without naming another keeps its element whole, and
|
||||
counting the md5 cleared announced a change absent from the file.
|
||||
"""
|
||||
if fe.platform is not None and not self.writable(fe):
|
||||
return False
|
||||
return super().states(fe, field_name)
|
||||
|
||||
@classmethod
|
||||
def writable(cls, fe: NativeFile, require: str = "") -> bool:
|
||||
"""es_bios.xsd makes md5 and core required; without them, no element.
|
||||
|
||||
Reference in new issue
Block a user