mirror of
https://github.com/lucannez64/darling-lol.git
synced 2026-10-27 19:54:38 +00:00
fix(launcher): close the League client UI while a match runs
The client does not come back properly after a match when its own "Close client during game" option is enabled. The UI (LeagueClientUx and its helpers) is a Chromium/CEF instance and, under Darling, the pre-match instance keeps running: the client the backend starts when the match ends is a second CEF instance on the same --user-data-dir, and its window never paints. Its DOM and audio work and the window stays black; closing the client by hand during a match leaves the same state for the same reason. RCLOL_CLOSE_CLIENT_IN_GAME=1 opts in to closing that UI from the host, and only while a match runs, so the client that appears afterwards is the only instance. The UI also competes with the game for CPU: on a four-core host with a Radeon RX 550 a practice match reported roughly 120 FPS with the UI running and roughly 180 FPS with it closed. This is not the helper-killing memory optimization the RAM section warns against, and the Riot client, the League backend and the game are never touched. The helper fails closed. It attributes the game and the client to the launcher's prefix through the loader's __mldr_sockpath, since guest processes do not carry DPREFIX (checked on a live session). It never closes a client younger than 60 seconds (the one the backend starts after a match), preserves a process of another installation or owner, acts only when the environment and the stat fields can be read, gives up after three closes in one match, and leaves after ten minutes without a client or a match. It is off by default. Tests use fake /proc entries and mock every signal.
This commit is contained in:
1 parent
d24f26ee63
commit
bc8fa71a7f
5 files changed
+513
No files matched your search
@@ -21,3 +21,4 @@ jobs:
|
||||
- run: python -m unittest discover -s tests -p 'test_system_profiler.py'
|
||||
- run: python -m unittest discover -s tests -p 'test_metal_device_info.py'
|
||||
- run: python -m unittest discover -s tests -p 'test_exec_guest.py'
|
||||
- run: python -m unittest discover -s tests -p 'test_close_league_client_in_game.py'
|
||||
Reference in new issue
Block a user