[fix] missing light(shader) setting + tray emit triggers multiple times

This commit is contained in:
Purp1e
2025-03-27 18:19:53 +08:00
parent faec03afb1
commit bbcaf8e0d1
3 changed files with 21 additions and 7 deletions

View File

@@ -45,7 +45,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
addToast({ title: `电源计划已切换 → ${PowerPlans[current].title}` })
})
})
}, [])
// 检测steam路径和游戏路径是否有效
const debounceSteamDir = useDebounce(steam.state.steamDir, {

View File

@@ -166,16 +166,16 @@ const VideoSetting = () => {
},
},
{
type: "videocfg_hdr_detail",
type: "shaderquality",
title: "光影细节",
value: video.videocfg_hdr_detail === "-1" ? "高" : "低",
value: video.shaderquality === "1" ? "高" : "低",
options: ["低", "高"],
mapping: (value: string) => {
return (
{
: "3",
: "-1",
}[value] || "3"
: "0",
: "1",
}[value] || "0"
)
},
},
@@ -210,6 +210,20 @@ const VideoSetting = () => {
)
},
},
{
type: "videocfg_hdr_detail",
title: "高动态范围",
value: video.videocfg_hdr_detail === "-1" ? "品质" : "性能",
options: ["性能", "品质"],
mapping: (value: string) => {
return (
{
: "3",
: "-1",
}[value] || "3"
)
},
},
{
type: "videocfg_fsr_detail",
title: "Fidelity FX 超级分辨率",

View File

@@ -29,7 +29,7 @@ export interface VideoSetting {
fullscreen_min_on_focus_loss: string; // 失去焦点时最小化全屏
high_dpi: string; // 高DPI
auto_config: string; // 自动配置
shaderquality: string; // 着色器质量
shaderquality: string; // 光影质量
r_texturefilteringquality: string; // 纹理过滤质量
msaa_samples: string; // 多重采样抗锯齿样本数
r_csgo_cmaa_enable: string; // CMAA抗锯齿启用