Skip to content

Add Steam launch options#450

Open
hazre wants to merge 13 commits intoKesomannen:masterfrom
hazre:feat/steam-launch-options
Open

Add Steam launch options#450
hazre wants to merge 13 commits intoKesomannen:masterfrom
hazre:feat/steam-launch-options

Conversation

@hazre
Copy link
Contributor

@hazre hazre commented Sep 30, 2025

Adds support for Steam launch options, allowing users to select different game modes defined by developers (VR, dedicated server, safe mode, etc.) when launching through Steam.

image
  • Dialog showing available launch options before starting a game
  • Toggle in Settings to enable/disable this feature (under Steam launch mode)
  • Support for all Steam launch option types (VR modes, dedicated servers, editors, etc.)

Implementation Notes

  • Uses VDF parser from Steam-Art-Manager to read Steam's binary
    appinfo.vdf file
    • Existing VDF libraries only support text format, not the binary format used by Steam's app cache or are not updated to support steam's latest magic header for binary vdf files.
  • Launch option display strings match Steam client's formatting
  • I didn't include Steam's "always use this option" functionality for simplicity reasons. So users have to select their choice each time if enabled.

@Kesomannen
Copy link
Owner

I don't really like dumping the whole vdf parser into the code like this. Are you sure there isn't a library to do it? Otherwise I would even prefer if one of use published it as a crate and have Gale use that.

@hazre
Copy link
Contributor Author

hazre commented Oct 2, 2025

I've looked around but they all seem to be missing the binary parsing or they're outdated but this was the only rust implementation that actually worked. I've made a issue about the crate thing already Tormak9970/Steam-Art-Manager#261

- Replace eager ok_or_eyre(format!) with lazy ok_or_else(|| eyre!) in platform.rs
- Remove redundant Map.get() check in Toolbar.svelte
@hazre hazre force-pushed the feat/steam-launch-options branch from 4b65263 to 224c1cf Compare October 2, 2025 19:41
@hazre
Copy link
Contributor Author

hazre commented Oct 3, 2025

Managed to get the vdf parser published as a crate, so I updated the code and replaced the VDF parser with new-vdf-parser crate 😄

@hazre
Copy link
Contributor Author

hazre commented Oct 12, 2025

@Kesomannen is there any blockers on this?

@hazre hazre requested a review from Kesomannen October 12, 2025 21:12
If you hadn't explicity selected steam, gamePrefs.platform would set to null which hides the option
Makes it look a bit more inline with the rest of the ui
@Kesomannen
Copy link
Owner

Kesomannen commented Oct 14, 2025

No, I just haven't been working on gale lately. I tested it out and made some tweaks!

Also, any ideas why PEAK shows a duplicated option?

bild

And I feel like the option should be on by default, no?

@hazre
Copy link
Contributor Author

hazre commented Oct 14, 2025

Also, any ideas why PEAK shows a duplicated option?

Looks like we need to filter by beta branches, steam lumps everything together. I need to see where steam stores launch options user configs.

And I feel like the option should be on by default, no?

I was just trying to respect the existing config behavior but yeah it should probably be default.

@hazre
Copy link
Contributor Author

hazre commented Oct 14, 2025

For now I just filtered out the beta branch options, since I can't seem to figure out where steam stores beta game preferences.

Also I almost completely forgot but also need to filter out options specific for linux, windows and proton. I think I got something but I need to actually test it on a linux machine.

@Kesomannen
Copy link
Owner

Were you gonna test it more or would you say this is ready to merge?

@hazre
Copy link
Contributor Author

hazre commented Nov 4, 2025

I haven't had a chance to test the local changes on linux but I can push it. Also probably need to merge in upstream and move the strings to localization stuff.

Copy link

@zandra20101-ui zandra20101-ui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I play this game

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.

3 participants