Live mod options: restart-only changes do not reach the running plugin

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shokunin
2026-10-08 19:03:21 -07:00
parent 00671ce845
commit a32471d5fd
3 changed files with 13 additions and 7 deletions
+3 -1
View File
@@ -2868,7 +2868,9 @@ extern "C" int psx_mod_set_option_live(const char* package_id, const char* featu
bool in_plan = false;
for (const ModResolution::Plugin& plugin : s.plan.plugins)
if (plugin.package_id == package_id && plugin.feature_id == feature_id) in_plan = true;
if (!in_plan) return 0;
if (!in_plan || !psx_mod_option_live_capable(package_id, feature_id)) return 0;
/* Only a feature whose plugin re-reads options live sees the new value;
* anything else keeps its committed value until the next start. */
live_option_values()[live_option_key(package_id, feature_id, option_id)] = value;
int live = 0;
for (const ModResolution::Plugin& plugin : s.plan.plugins) {