(
f: impl FnOnce(&steamworks::Client) -> Result<T, SteamError>,
)
| 135 | Ok(()) |
| 136 | } |
| 137 | |
| 138 | /// Ask the OS to start the Steam client (no-op if already running). Fire and |
| 139 | /// forget: the game does not wait for it or reconnect this session. |
| 140 | fn open_steam_client() { |
| 141 | #[cfg(target_os = "windows")] |
| 142 | let spawned = std::process::Command::new("explorer") |
| 143 | .arg("steam://open/main") |
| 144 | .spawn(); |
| 145 | #[cfg(target_os = "macos")] |
| 146 | let spawned = std::process::Command::new("open") |
| 147 | .arg("steam://open/main") |
| 148 | .spawn(); |
| 149 | #[cfg(all(unix, not(target_os = "macos")))] |
| 150 | let spawned = std::process::Command::new("xdg-open") |
| 151 | .arg("steam://open/main") |
| 152 | .spawn(); |
no test coverage detected