Commit cd386a3
committed
[GameMode] Don't probe libgamemode on every config load, preserve user setting
Two related fixes for the GameMode startup behavior on Linux:
1. configuration.c: Only call frontend_driver_set_gamemode() during config
load when gamemode_enable is actually true. Previously the probe ran
unconditionally with the current setting value, meaning every user on
every config load triggered a dlopen of libgamemode.so even when the
feature was off - producing log spam ("[GameMode] GameMode cannot be
enabled on this system...") for the majority of users who don't have
libgamemode installed.
Also stop force-disabling gamemode_enable in the config when the probe
fails. Silently flipping the user's preference to false and persisting
it to retroarch.cfg meant a transient failure (sandbox path issue,
library not yet installed, multi-arch mismatch, etc.) would require
the user to manually re-enable the option on every subsequent launch.
The user's intent should survive across sessions; if libgamemode shows
up later, the next launch picks it up automatically.
2. frontend/drivers/platform_unix.c: Latch the unavailable state inside
frontend_unix_set_gamemode() once gamemode_query_status() reports
failure. The result will not change for the lifetime of the process,
so subsequent calls (deinit cleanup, menu toggles) short-circuit
without re-entering the Feral client code and without re-emitting the
warning. The warning now fires exactly once per process when the user
has gamemode enabled but libgamemode is missing.
The redundant "[Config] GameMode unsupported - disabling..." follow-up
warning is removed - it added no information beyond what the GameMode
warning already conveys.1 parent 0a77580 commit cd386a3
2 files changed
Lines changed: 25 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4653 | 4653 | | |
4654 | 4654 | | |
4655 | 4655 | | |
4656 | | - | |
4657 | | - | |
4658 | | - | |
4659 | | - | |
4660 | | - | |
4661 | | - | |
4662 | | - | |
4663 | | - | |
| 4656 | + | |
| 4657 | + | |
| 4658 | + | |
| 4659 | + | |
| 4660 | + | |
| 4661 | + | |
| 4662 | + | |
| 4663 | + | |
| 4664 | + | |
| 4665 | + | |
4664 | 4666 | | |
4665 | 4667 | | |
4666 | 4668 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2186 | 2186 | | |
2187 | 2187 | | |
2188 | 2188 | | |
2189 | | - | |
2190 | | - | |
| 2189 | + | |
| 2190 | + | |
| 2191 | + | |
| 2192 | + | |
| 2193 | + | |
| 2194 | + | |
| 2195 | + | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
2191 | 2203 | | |
2192 | 2204 | | |
2193 | 2205 | | |
| |||
2196 | 2208 | | |
2197 | 2209 | | |
2198 | 2210 | | |
| 2211 | + | |
2199 | 2212 | | |
2200 | 2213 | | |
2201 | 2214 | | |
| |||
0 commit comments