[PR #749] [MERGED] Prefix libretro core options with core name. #98

Open
opened 2026-01-29 19:06:24 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/stenzek/duckstation/pull/749
Author: @dankcushions
Created: 8/12/2020
Status: Merged
Merged: 8/12/2020
Merged by: @stenzek

Base: masterHead: coreopts


📝 Commits (1)

  • 971d262 Prefix libretro core options with core name.

📊 Changes

2 files changed (+32 additions, -31 deletions)

View changed files

📝 src/duckstation-libretro/libretro_host_interface.cpp (+30 -30)
📝 src/duckstation-libretro/libretro_settings_interface.cpp (+2 -1)

📄 Description

Until only recently RetroArch's default behaviour was to save all core options for the installed cores in one global .cfg file. Now it defaults to splitting them out into individual files per-core, but the user may still configure it to use a global file via global_core_options = "true". The latter is the behavior of my concern, the RetroPie project.

To that end, it's suggested for libretro cores to prefix all core options with the name of the core, so they can be grouped and easily identified within a global .cfg. see https://github.com/libretro/RetroArch/blob/master/libretro-common/include/libretro.h#L1150-L1152

Eg:

beetle_psx_analog_calibration = "disabled"
beetle_psx_analog_toggle = "disabled"
beetle_psx_aspect_ratio = "corrected"
beetle_psx_cd_access_method = "async"
beetle_psx_cd_fastload = "2x(native)"

I have introduced the same behaviour here. Obviously any setting changes made before this change will be left as clutter in the file, and not retrieved. Could put some code in to pick up the previous settings (and subsequently save them under the new format) but you may consider that clutter in the code.

NOTE: I do see this in the logs:

[libretro WARN] [retro_set_environment] Failed to set core options, settings will not be changeable.

...however the new core options seem to save and load anyway 🤷‍♂️. I might have missed something...


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/stenzek/duckstation/pull/749 **Author:** [@dankcushions](https://github.com/dankcushions) **Created:** 8/12/2020 **Status:** ✅ Merged **Merged:** 8/12/2020 **Merged by:** [@stenzek](https://github.com/stenzek) **Base:** `master` ← **Head:** `coreopts` --- ### 📝 Commits (1) - [`971d262`](https://github.com/stenzek/duckstation/commit/971d262b0cd9f0a5bd4602dae6d7e406f90764f6) Prefix libretro core options with core name. ### 📊 Changes **2 files changed** (+32 additions, -31 deletions) <details> <summary>View changed files</summary> 📝 `src/duckstation-libretro/libretro_host_interface.cpp` (+30 -30) 📝 `src/duckstation-libretro/libretro_settings_interface.cpp` (+2 -1) </details> ### 📄 Description Until [only recently](https://github.com/libretro/RetroArch/commit/d9673b8c8fd86d8e2fdcfac503e3da2cd53af6e3) RetroArch's default behaviour was to save all core options for the installed cores in one global .cfg file. Now it defaults to splitting them out into individual files per-core, but the user may still configure it to use a global file via `global_core_options = "true"`. The latter is the behavior of my concern, the RetroPie project. To that end, it's suggested for libretro cores to prefix all core options with the name of the core, so they can be grouped and easily identified within a global .cfg. see https://github.com/libretro/RetroArch/blob/master/libretro-common/include/libretro.h#L1150-L1152 Eg: ``` beetle_psx_analog_calibration = "disabled" beetle_psx_analog_toggle = "disabled" beetle_psx_aspect_ratio = "corrected" beetle_psx_cd_access_method = "async" beetle_psx_cd_fastload = "2x(native)" ``` I have introduced the same behaviour here. Obviously any setting changes made before this change will be left as clutter in the file, and not retrieved. Could put some code in to pick up the previous settings (and subsequently save them under the new format) but you may consider that clutter in the code. **NOTE:** I do see this in the logs: ``` [libretro WARN] [retro_set_environment] Failed to set core options, settings will not be changeable. ``` ...however the new core options seem to save and load anyway :man_shrugging:. I might have missed something... --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 19:06:24 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/duckstation#98