-
Notifications
You must be signed in to change notification settings - Fork 18
feat: 新增游戏路径设置,未找到游戏窗口时自动打开游戏并延时重试 #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -971,6 +971,7 @@ export const useAppStore = create<AppState>()( | |
| autoRunOnLaunch: config.settings.autoRunOnLaunch ?? false, | ||
| autoStartRemovedInstanceName: config.settings.autoStartRemovedInstanceName, | ||
| minimizeToTray: config.settings.minimizeToTray ?? false, | ||
| gamePath: config.settings.gamePath ?? '', | ||
| onboardingCompleted: config.settings.onboardingCompleted ?? false, | ||
| preActionConnectDelaySec: config.settings.preActionConnectDelaySec ?? 5, | ||
| hotkeys: config.settings.hotkeys ?? { | ||
|
|
@@ -1281,6 +1282,10 @@ export const useAppStore = create<AppState>()( | |
| } | ||
| }, | ||
|
|
||
| // 游戏路径设置(窗口未找到时自动启动游戏) | ||
| gamePath: '', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue (bug_risk): 第二次对 这个在 store 初始状态中的 Original comment in Englishissue (bug_risk): The second This |
||
| setGamePath: (path) => set({ gamePath: path }), | ||
|
|
||
| // 新用户引导 | ||
| onboardingCompleted: false, | ||
| setOnboardingCompleted: (completed) => set({ onboardingCompleted: completed }), | ||
|
|
@@ -1662,6 +1667,7 @@ function generateConfig(): MxuConfig { | |
| autoRunOnLaunch: state.autoRunOnLaunch, | ||
| autoStartRemovedInstanceName: state.autoStartRemovedInstanceName, | ||
| minimizeToTray: state.minimizeToTray, | ||
| gamePath: state.gamePath, | ||
| onboardingCompleted: state.onboardingCompleted, | ||
| preActionConnectDelaySec: state.preActionConnectDelaySec, | ||
| hotkeys: state.hotkeys, | ||
|
|
@@ -1721,6 +1727,7 @@ useAppStore.subscribe( | |
| autoRunOnLaunch: state.autoRunOnLaunch, | ||
| autoStartRemovedInstanceName: state.autoStartRemovedInstanceName, | ||
| minimizeToTray: state.minimizeToTray, | ||
| gamePath: state.gamePath, | ||
| onboardingCompleted: state.onboardingCompleted, | ||
| hotkeys: state.hotkeys, | ||
| recentlyClosed: state.recentlyClosed, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: 日志中硬编码的
60秒可能会与WINDOW_RETRY_DELAY_MS不一致。由于
WINDOW_RETRY_DELAY_MS是60_000,这条日志应当从该常量推导秒数(例如WINDOW_RETRY_DELAY_MS / 1000),这样当延迟修改时,日志信息依然是准确的。Original comment in English
suggestion: The hardcoded
60seconds in the log can drift fromWINDOW_RETRY_DELAY_MS.Since
WINDOW_RETRY_DELAY_MSis60_000, this log should derive the seconds from that constant (e.g.WINDOW_RETRY_DELAY_MS / 1000) so the message stays accurate if the delay changes.