mirror of
https://github.com/lucannez64/darling-lol.git
synced 2026-10-26 19:47:42 +00:00
feat(launcher): hide the League client UI while a match runs
Add an opt-in alternative to closing LeagueClientUx: hide the managed LeagueClientUx and Riot Client X11 windows while the game process runs and show them again when it exits. The client stays open; the game window is never touched. Detection is attributed to the launcher prefix through __mldr_sockpath and fails closed when proc, ownership or window state is unreadable. The helper requires X11/Xwayland, restores the window on end, signal or error, and is mutually exclusive with RCLOL_CLOSE_CLIENT_IN_GAME=1. Document the flag, compliance scope and limits. A local 30-second test on an i5-3470/RX 550 reduced summed client/CEF CPU from 120.7% to 93.4%; this is a CPU-bound-host measurement, not a universal FPS claim. No client binaries, CEF, assets or anti-cheat are modified.
This commit is contained in:
1 parent
e4e98ea688
commit
899576cbbc
7 files changed
+537
No files matched your search
@@ -78,6 +78,14 @@ opts in to Hyprland-only recovery of a default-prefix Riot session with no
|
||||
visible window; it is off by default. See [troubleshooting](TROUBLESHOOTING.md#riot-exits-and-league-reports-that-it-lost-its-connection)
|
||||
for the observed failures, recovery guards and NSURLSession limitations.
|
||||
|
||||
`RCLOL_HIDE_CLIENT_IN_GAME=1` opts in to hiding the managed `LeagueClientUx`
|
||||
and `Riot Client` X11 windows while a match runs, then showing them when the
|
||||
game process ends. It keeps the client open and is mutually exclusive with
|
||||
`RCLOL_CLOSE_CLIENT_IN_GAME=1` (close takes precedence). It is off by default,
|
||||
requires X11/Xwayland, and does not patch client binaries, CEF or the game. See
|
||||
[the troubleshooting measurement](TROUBLESHOOTING.md#keep-the-client-open-but-hide-it-during-a-match)
|
||||
for the measured CPU effect and limitations.
|
||||
|
||||
`RCLOL_FILTER_HOST_ENV=1` opts in to removing host desktop-session variables before
|
||||
the guest starts: `WAYLAND_DISPLAY`, `XDG_SESSION_*`, `XDG_CURRENT_DESKTOP`,
|
||||
GNOME/KDE/GDM, systemd, SSH agent, terminal, toolkit (`QT_*`, `GTK_*`, `GDK_*`),
|
||||
|
||||
@@ -192,6 +192,55 @@ observation, without waiting for a match:
|
||||
python3 tools/close-league-client-in-game.py --once --dry-run
|
||||
```
|
||||
|
||||
### Keep the client open but hide it during a match
|
||||
|
||||
`LeagueClientUx` can consume a noticeable amount of CPU while the client stays
|
||||
open during a match. An opt-in alternative to closing it hides the managed
|
||||
client window instead:
|
||||
|
||||
```sh
|
||||
RCLOL_HIDE_CLIENT_IN_GAME=1 ./scripts/run.sh
|
||||
```
|
||||
|
||||
The launcher detects when a match starts, unmaps the `LeagueClientUx` and
|
||||
`Riot Client` X11 windows, and maps them again when the game process ends. The
|
||||
client is not closed, the League backend and Riot client keep running, and the
|
||||
game window is never hidden. `RCLOL_CLOSE_CLIENT_IN_GAME=1` takes precedence
|
||||
when both flags are set.
|
||||
|
||||
The helper is off by default and window-management only: it does not patch
|
||||
client binaries, CEF, anti-cheat or DRM. It attributes the game to this prefix
|
||||
through the loader's `__mldr_sockpath`, and fails closed when ownership, proc
|
||||
state, environment or window information cannot be read. It requires an X11 or
|
||||
Xwayland desktop; on a native Wayland window manager without Xwayland it cannot
|
||||
find the windows.
|
||||
|
||||
On a CPU-bound host the effect appears after CEF has been hidden for a few
|
||||
seconds. In a local 30-second test on an i5-3470 with a Radeon RX 550, hiding
|
||||
`LeagueClientUx` reduced the summed CPU of the matched client/CEF processes from
|
||||
120.7% to 93.4% (about 23%, or 27 percentage points, of one core); showing the
|
||||
window returned it to 119.9%. This is not a universal FPS or percentage claim:
|
||||
a game that is GPU-bound, a client with no active UI work, or a different
|
||||
desktop may show less benefit. The hidden window can also need a moment to
|
||||
repaint after it is shown.
|
||||
|
||||
`RCLOL_CLOSE_CLIENT_IN_GAME=1` remains the more aggressive option when in-client
|
||||
chat during the match is not needed. Configure one of the two, not both:
|
||||
|
||||
```sh
|
||||
# Keep the client open, hide its windows while playing
|
||||
RCLOL_HIDE_CLIENT_IN_GAME=1 ./scripts/run.sh
|
||||
|
||||
# Or close the client UI while playing
|
||||
RCLOL_CLOSE_CLIENT_IN_GAME=1 ./scripts/run.sh
|
||||
```
|
||||
|
||||
Diagnose the match detector without changing any window:
|
||||
|
||||
```sh
|
||||
python3 tools/hide-league-client-in-game.py --once
|
||||
```
|
||||
|
||||
### Riot reports NO INTERNET FOUND while the host is online
|
||||
|
||||
Older base runtimes ship Google DNS servers (`8.8.8.8` and `8.8.4.4`), which
|
||||
|
||||
Reference in new issue
Block a user