Skip to content

cheats: fall back to content path for game-specific files#19089

Open
Splaser wants to merge 4 commits into
libretro:masterfrom
Splaser:cheats-content-basename-fallback
Open

cheats: fall back to content path for game-specific files#19089
Splaser wants to merge 4 commits into
libretro:masterfrom
Splaser:cheats-content-basename-fallback

Conversation

@Splaser

@Splaser Splaser commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Runtime-created cheats may fail to persist when no cheat file has been loaded beforehand.

Game-specific cheat filenames were derived from runloop_st->name.cheatfile only. When a cheat is created from the menu without first loading an existing .cht file, this value can be empty, causing cheat_manager_get_game_specific_filename() to return 0 and preventing the cheat list from being saved.

Fall back to the current content basename/path when no cheatfile name is available, while preserving the existing cheatfile-based behavior when it is set.

Tested on Android aarch64:

  • launched content without loading an existing .cht file
  • added a runtime cheat entry from Quick Menu > Cheats
  • closed content and verified a game-specific .cht file was created
  • relaunched the same content and verified the cheat list persisted

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