windows_tool 0.0.9

一个 Windows 库 可以设置端口代理 elevate 提升权限 管理员权限 registry 注册表 port_forwarding 端口转发设置 steam vdf 格式 steam apex 启动项设置
Documentation
//! PUBG(Steam App ID [`PUBG_APP_ID`])启动项读写。

use crate::steam::{get_steam_game_launch_options, set_steam_game_launch_options};

/// PUBG 的 Steam App ID。
pub const PUBG_APP_ID: usize = 578080;

// 获取 PUBG Steam 启动选项
pub fn get_pubg_launch_options_by_steam_user_id(steam_user_id: usize) -> Result<String, String> {
    get_steam_game_launch_options(steam_user_id, PUBG_APP_ID)
}

// 设置 PUBG Steam 启动选项
pub fn set_pubg_launch_options_by_steam_user_id<T: AsRef<str>>(
    steam_user_id: usize,
    launch_options: T,
) -> Result<(), String> {
    set_steam_game_launch_options(steam_user_id, PUBG_APP_ID, launch_options)
}