RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

Performance Counters setting doesnt persist through restart

Open klepp0906 opened this issue 5 years ago • 3 comments

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

  1. settings > logging > performance counters > ON
  2. exit retroarch
  3. restart retroarch
  4. 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]

klepp0906 avatar May 03 '20 11:05 klepp0906

Still present in 1.15.0, see: #14839

bbbradsmith avatar Sep 05 '23 20:09 bbbradsmith

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 ;)

gouchi avatar Mar 18 '24 21:03 gouchi

Hello pls can anybody take a look into this?

Kelvfimer avatar Dec 25 '24 05:12 Kelvfimer

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)

sonninnos avatar Feb 09 '25 19:02 sonninnos