Commit 71a1398
committed
(X11) Probe for xdg-screensaver/xset before invoking suspend
xdg-screensaver's X11 backend shells out to xset internally. On systems
without x11-xserver-utils installed (minimal installs, containers, some
WMs) the resulting failures surface as confusing stderr spam:
/usr/bin/xdg-screensaver: 885: xset: not found
/usr/bin/xdg-screensaver: 893: [: Illegal number:
/usr/bin/xdg-screensaver: 632: xset: not found
with no indication that the missing dependency is xset rather than
something in RetroArch itself.
Probe once on first use via 'command -v' (POSIX shell builtin, no extra
deps) for both xdg-screensaver and xset, with output silenced. If either
is missing, flip xdg_screensaver_available to false and log a single
explanatory line; subsequent calls short-circuit out cleanly. Probe is
gated behind a static bool so it runs at most once per process, and only
when we'd actually invoke xdg-screensaver -- the DBus inhibit path still
returns early before we ever get here.1 parent 8ea17a0 commit 71a1398
1 file changed
Lines changed: 31 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
| 255 | + | |
260 | 256 | | |
261 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
262 | 280 | | |
263 | 281 | | |
264 | 282 | | |
| |||
312 | 330 | | |
313 | 331 | | |
314 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
315 | 341 | | |
316 | 342 | | |
317 | 343 | | |
| |||
0 commit comments