refactor(utils): 禁用屏幕开关并优化 xset 查找逻辑
- 注释掉所有 BlankOpen/BlankClose 调用,启动不再关屏 - 将 xset 路径查找改为 init + sync.Once 缓存,避免重复执行 - 清理未使用的 utils 导入 Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"game-driver/internal/schema"
|
||||
"game-driver/pkg/utils"
|
||||
"game-driver/pkg/video"
|
||||
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@@ -19,8 +20,8 @@ func Video(item schema.WaitItemModel) func(c context.Context) error {
|
||||
zap.S().Infoln("播放待机视频")
|
||||
defer zap.S().Infoln("结束待机视频")
|
||||
|
||||
utils.BlankOpen()
|
||||
defer utils.BlankClose()
|
||||
// utils.BlankOpen()
|
||||
// defer utils.BlankClose()
|
||||
|
||||
err = video.Play(c, path, local)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user