Performance Counters setting doesnt persist through restart
First and foremost consider this:
- Only RetroArch bugs should be filed here. Not core bugs or game bugs
- This is not a forum or a help section, this is strictly developer oriented
Description
Enabling performance counters auto disables itself.
Expected behavior
Id expect the toggle to persist beyond restarting retroarch like the rest.
Actual behavior
admittedly i dont know "exactly" what the setting does. its how i discovered this. going through settings with a comb and i assume(d) this adds more data to your logfile when logging. A simple toggle to include or exclude performance data?
either way, if you flip it on and exit retroarch when you come back its disabled itself.
Steps to reproduce the bug
- settings > logging > performance counters > ON
- exit retroarch
- restart retroarch
- settings > logging > performance counters > now OFF
Bisect Results
[Try to bisect and tell us when this started happening]
Version/Commit
You can find this information under Information/System Information
- RetroArch: 1.85 62c2842c86 (yes i know the build is a tad old - stuck here due to a savestate crashing bug that hasnt had the fix merged yet)
Environment information
- OS: Win10
- Compiler: [In case you are running local builds]
Still present in 1.15.0, see: #14839
FWIU, performance counter setting is saved but it seems there an issue when loading the configuration file for this boolean parameter as perfcnt_enable is not listed ?
bool_settings is created from populate_settings_bool.
The menu setting for performance counter is defined here.
To be continued ;)
Hello pls can anybody take a look into this?
It looks like it is deliberately meant to be temporary, but I have no idea why.
Just need to fire it back up when reading the conf, and then the option follows:
diff --git a/configuration.c b/configuration.c
index baa0776947..ac320a1d25 100644
--- a/configuration.c
+++ b/configuration.c
@@ -3735,6 +3735,14 @@ static bool config_load_file(global_t *global,
}
#endif
+ /* Special case for perfcnt_enable */
+ {
+ bool tmp = false;
+ config_get_bool(conf, "perfcnt_enable", &tmp);
+ if (tmp)
+ retroarch_ctl(RARCH_CTL_SET_PERFCNT_ENABLE, NULL);
+ }
+
/* Overrides */
if (rarch_flags & RARCH_FLAGS_HAS_SET_USERNAME)