Skip to content

Games: find Steam and Epic Games on Windows - #65

Merged
hex-dump merged 2 commits into
mainfrom
fix/windows-games
Nov 17, 2026
Merged

hex-dump merged 2 commits into
mainfrom
fix/windows-games

Conversation

@hex-dump

Copy link
Copy Markdown
Owner

On Windows, "Add from installed games" came up empty or missed games. Going through the path end to end, I found these causes:

  • Steam was only looked for in Program Files (x86)\Steam. If Steam lives anywhere else (another drive, a custom folder) nothing was found. It now also reads the install folder from the registry (HKCU\Software\Valve\Steam SteamPath, HKLM\...\WOW6432Node\Valve\Steam InstallPath) before falling back to the default folders.
  • The game's program was only searched for directly inside the game's folder, so any game with its exe in bin\x64 (Cyberpunk and many others) or in an Unreal <Game>\Binaries\Win64 was dropped silently. It now looks three levels deep, prefers Unreal -Win64-Shipping.exe (that is the process that owns the window, the small exe in the root only starts it), and skips installers, crash reporters, redistributables and anti-cheat helpers. The old skip list matched anything containing "crash", which hid games like Crash Bandicoot; it is narrower now.
  • The Epic Games Launcher was not supported at all (only Heroic). It now reads %ProgramData%\Epic\EpicGamesLauncher\Data\Manifests\*.item (ProgramData from the environment, not hardcoded): DisplayName, LaunchExecutable, InstallLocation, skipping DLC, unfinished installs and entries with no program. Listed as "Epic".
  • Focus detection on Windows used a MAX_PATH sized buffer for the process path, so a game in a deep folder gave no app in focus at all. It uses the 32768 limit now.
  • JSON files with a UTF-8 byte order mark are read too.

libraryfolders.vdf parsing (old and new layout, doubled backslashes) was already correct, now covered by tests with Windows style fixtures. Rule matching against the running exe is case insensitive already, so nothing to change there. Nothing in the frontend filtered games out; I only updated the "No games found" text.

Tests: new unit tests with fixture files in crates/perihub-core/tests/fixtures/games that run on Linux (Windows paths, both vdf layouts, registry folder plus second library, nested and Unreal exes, Epic manifests including a BOM, DLC and an unfinished install). cargo test -p perihub-core passes, clippy and fmt are clean. The Windows only code (registry read, focus buffer) was type-checked for x86_64-pc-windows-msvc in a small scratch crate, since hidapi's C build does not cross compile here. I could not run it on a real Windows machine: the registry read, a real Epic manifest set and a real Steam library still need a check there. The Epic manifest field names (MainWindowProcessName, MainGameAppName) come from my knowledge of the format, not from a manifest I could open here.

🤖 Generated with Claude Code

hex-dump and others added 2 commits November 17, 2026 18:24
Steam is also looked for where the registry says it is, a game's program is
searched a few folders deep (Unreal games included), the Epic Games Launcher's
manifests are read, and the focused app is recognised for games in deep folders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…value size

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hex-dump
hex-dump merged commit 71a0460 into main Nov 17, 2026
9 checks passed
@hex-dump
hex-dump deleted the fix/windows-games branch November 17, 2026 18:13
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.

1 participant