Fix Discord stream handoff in Universal mode by Ku-Tadao · Pull Request #140 · PenguLoader/PenguLoader · GitHub
Skip to content

Fix Discord stream handoff in Universal mode#140

Open
Ku-Tadao wants to merge 1 commit into
PenguLoader:2026from
Ku-Tadao:fix/discord-stream-handoff
Open

Fix Discord stream handoff in Universal mode#140
Ku-Tadao wants to merge 1 commit into
PenguLoader:2026from
Ku-Tadao:fix/discord-stream-handoff

Conversation

@Ku-Tadao

@Ku-Tadao Ku-Tadao commented May 7, 2026

Copy link
Copy Markdown

Summary

Fixes the Discord application-stream handoff from League Client to the in-game League of Legends.exe process when Pengu Loader is activated through IFEO/Universal mode.

In Universal mode, Windows starts Pengu through the IFEO Debugger value as rundll32, and Pengu then creates the real LeagueClientUx.exe process. That makes LCUX appear as a child of rundll32 instead of Riot's normal launcher chain, which appears to break Discord's League Client -> game stream association.

This PR keeps the IFEO bootstrap behavior, but when _BootstrapEntry creates LeagueClientUx.exe, it uses PROC_THREAD_ATTRIBUTE_PARENT_PROCESS with the bootstrapper's inherited parent process. In local testing this made LeagueClientUx.exe appear under the normal Riot LeagueClient.exe process again instead of under rundll32.

Validation

Locally validated on Windows with Discord application streaming:

  • before this change, Discord stayed on the League Client stream when entering game
  • hiding or closing the client caused Discord to pause/stop the stream instead of switching
  • preserving Riot's original CEF window hierarchy did not fix the handoff
  • with this parent-process change, Discord successfully transitioned from League Client to the game
  • process diagnostics confirmed LeagueClientUx.exe was parented to LeagueClient.exe instead of rundll32
  • Release x64 core build passes with MSBuild

Notes

This is intentionally separate from the PluginFS PR. The local live test was also run with a combined PluginFS build so folder plugins could be validated at the same time, but the actual Discord fix is independent and only changes core/src/dllmain.cc.

This uses a documented Windows process creation attribute. It does not inject into the game process and does not change the game process. Reviewers should still treat this as a sensitive compatibility fix because anti-cheat/security tools can care about process ancestry.

Fixes #106.

@nomi-san nomi-san changed the base branch from main to 2026 May 8, 2026 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stream Bugged

1 participant