Skip to content

rocknix: read the RetroAchievements keys EmulationStation writes - #3279

Open
maxengel wants to merge 1 commit into
ROCKNIX:nextfrom
maxengel:pr/retroachievements-keys
Open

rocknix: read the RetroAchievements keys EmulationStation writes#3279
maxengel wants to merge 1 commit into
ROCKNIX:nextfrom
maxengel:pr/retroachievements-keys

Conversation

@maxengel

@maxengel maxengel commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • What is the goal of this PR? Make the switches on EmulationStation's RETROACHIEVEMENTS page reach RetroArch. Three of them never did: ES writes retroachievements.challenge_indicators, .encore and .unofficial (batocera's names since 2021), while setsettings.sh read .challengeindicators, .active and .testunofficial, and the shipped system.cfg seeded two of those old names at 0 — so CHALLENGE INDICATORS, ENCORE MODE and UNOFFICIAL ACHIEVEMENTS did nothing whatever they were set to. cheevos_dolphin.sh and cheevos_melonds.sh read .testunofficial too. The script now reads the name ES writes and falls back to the old one (add_setting_either), so a hand-edited config keeps working; the two standalone scripts do the same; the defaults seed ES's spellings. It also maps retroachievements.progress_trackercheevos_visibility_progress_tracker for the PROGRESS TRACKER switch added in the companion EmulationStation PR (the bottom-right count toward an achievement is a different widget from the challenge indicators and had no switch), seeded at 1 — RetroArch's default — so nothing changes until someone turns it off.

Testing

  • How was this tested? On a GENERIC_X64 VM, the shipped and the fixed setsettings.sh were run over three shapes of system.cfg and the appended RetroArch config (/tmp/.retroarch.cfg) read back each time. Then an H700 build with the change went onto an RG35XX SP and an RG SP.

  • Test results (cheevos_challenge_indicators / cheevos_test_unofficial / cheevos_start_active):

    ES keys 1, old keys 0:   shipped  "0" / "0" / ""
                             fixed    "1" / "1" / "1"
    only old keys, at 1:     fixed    "1" / "1" / "1"
    ES keys 0, old keys 0:   shipped  "0" / "0" / ""
                             fixed    "0" / "0" / "0"
    progress_tracker 0 / 1 / unset:   "0" / "1" / ""
    

    On the RG35XX SP before the fix, the last launch's appended config carried cheevos_challenge_indicators = "0" from the seed regardless of the switch.

Additional Context

  • The seeded defaults in system.cfg change spelling; an upgraded device keeps its old keys and the fallback still reads them, so nobody's setting moves.
  • Companion PR: ROCKNIX/emulationstation-next (PROGRESS TRACKER row). This PR is safe to merge alone — with the switch absent the key is unset and RetroArch keeps its default.

AI Usage

Did you use AI tools to help write this code? YES — written with Claude Code, reviewed and tested by the submitter.

Three switches on EmulationStation's RETROACHIEVEMENTS page never
reached RetroArch. ES writes retroachievements.challenge_indicators,
.encore and .unofficial (the names batocera's ES has used since 2021),
while setsettings.sh read .challengeindicators, .active and
.testunofficial, and the shipped system.cfg seeded two of those old
names at 0. So CHALLENGE INDICATORS, ENCORE MODE and UNOFFICIAL
ACHIEVEMENTS did nothing: RetroArch received the seed (0) or an empty
value whatever the switch said. cheevos_dolphin.sh and
cheevos_melonds.sh read .testunofficial too.

setsettings.sh now reads the name ES writes and falls back to the old
one (add_setting_either), so a hand-edited config keeps working; the two
standalone scripts do the same; the shipped defaults seed ES's
spellings.

Also mapped: retroachievements.progress_tracker to
cheevos_visibility_progress_tracker, for the PROGRESS TRACKER switch the
companion EmulationStation change adds (the bottom-right count toward an
achievement is a different widget from the challenge indicators and had
no switch). Seeded at 1, RetroArch's default, so nothing changes until
someone turns it off.

Verified on a GENERIC_X64 VM by running the shipped and the fixed script
over three config shapes and reading the appended RetroArch config
(challenge_indicators / test_unofficial / start_active):

  ES keys 1, old keys 0:   shipped  "0" / "0" / ""
                           fixed    "1" / "1" / "1"
  only old keys, at 1:     fixed    "1" / "1" / "1"
  ES keys 0, old keys 0:   shipped  "0" / "0" / ""
                           fixed    "0" / "0" / "0"
  progress_tracker 0 / 1 / unset:   "0" / "1" / ""

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
maxengel added a commit to maxengel/emulationstation-next-rocknix that referenced this pull request Sep 7, 2026
RetroArch's progress tracker -- the bottom-right count toward an
achievement, 34/99 rings -- is a separate widget from the challenge
indicators and had no switch on this page, so it could not be turned off
(found on an RG35XX SP while trying CHALLENGE INDICATORS). One row, on by
default as RetroArch ships it: absent reads as on, so an upgraded device's
row shows the state it is in. The launch script maps
retroachievements.progress_tracker to cheevos_visibility_progress_tracker
(ROCKNIX/distribution#3279).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant