Skip to content

Deduplicate truthy and 7z member listing across emulator modules #74

Description

@LoneAngelFayt

Two helpers exist in several near-identical copies:

Boolean env parsing. settings.truthy (added in #72) is the canonical one. rpcs3._truthy, shadps4._truthy and xemu._truthy are private copies with the same spelling rules. Replace them with settings.truthy, and move RPCS3_CACHE_ENABLED, SHADPS4_CACHE_ENABLED and XEMU_SOFTWARE_GL into settings.py while there, per CONTRIBUTING.

7z member listing. extraction_cache._7z_member_paths has near-copies in rpcs3._7z_member_paths and shadps4._7z_member_paths, and the size listing (7z l -slt) is repeated too. retroarch._archive_member_names (from #72) reaches into the private extraction_cache helper. Expose a public extraction_cache.list_members(archive, timeout) covering zip and 7z, and have rpcs3, shadps4 and retroarch call it. _reject_unsafe_members is also copied in rpcs3 and shadps4.

This is a pure refactor with no behavior change. Existing tests (test_rpcs3, test_shadps4, test_xemu, test_retroarch) should pass unchanged, apart from the tests that target the removed private helpers.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions