Skip to content

Steam launch options: accept env-style args without %command% (all stores) - #5

Open
Leb-Sun wants to merge 1 commit into
mainfrom
launch-options-env-args
Open

Steam launch options: accept env-style args without %command% (all stores)#5
Leb-Sun wants to merge 1 commit into
mainfrom
launch-options-env-args

Conversation

@Leb-Sun

@Leb-Sun Leb-Sun commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Fixes the %command% requirement Nick raised: a plain env-style launch option like
WINEDLLOVERRIDES=D3D12=d or DXVK_HUD=FPS now applies without appending %command%,
and behaves consistently across Steam / Epic / GOG / Custom.

What changed (2 files, +40/−1):

  • SteamLaunchOptions.parse() — with no %command%, a leading run of UPPERCASE KEY=VALUE
    tokens is read as env vars (shell-style prefix); the first non-env token onward stays game
    args, kept verbatim (quotes preserved). The %command% branch is untouched, so existing
    X=Y %command% args strings behave exactly as before.
  • XServerDisplayActivity — Epic/GOG/Custom now route their exec args through
    SteamLaunchOptions.gameArgs() like the Steam path already does, so %command%/env tokens
    stop leaking into the game's argv (cross-store parity).

Behavior:

  • WINEDLLOVERRIDES=D3D12=d, DXVK_HUD=FPS, DXVK_HUD=FPS -windowed → env applied, no %command%.
  • -dx11, +connect, lowercase key=value → stay game args (uppercase-guarded, so real custom
    args aren't swallowed).
  • WINEDLLOVERRIDES="winhttp=n,b" %command% (pasted mod/protondb command) → unchanged.

Known edge (accepted): an UPPERCASE KEY=VALUE that is genuinely a game argument, typed
with no %command%, would be read as env — rare; %command% KEY=val forces it back to an arg.

Cut from upstream main; opened against my own main to trigger a build and track it separately
(no upstream PR yet).

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