-
Notifications
You must be signed in to change notification settings - Fork 627
靠边检测 #541
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
The head ref may contain hidden characters: "dev-\u9760\u8FB9\u68C0\u6D4B"
Merged
靠边检测 #541
Changes from 3 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
83987a6
尝试修复靠边的多屏幕兼容问题
YIYuNCU 378881e
修复拼写错误,添加切换主屏幕相关代码
YIYuNCU 543a8d8
引入自动切换屏幕功能,添加设置项(未添加设置UI)
YIYuNCU 8b8bdc3
Potential fix for pull request finding
LorisYounger 594bb48
Potential fix for pull request finding
LorisYounger 8cb7a48
Merge pull request #544 from LorisYounger/main
LorisYounger c1a40fb
添加自动切换屏幕功能(自动开启)
YIYuNCU a4c87c6
Merge branch 'dev-靠边检测' of https://github.com/LorisYounger/VPet into …
YIYuNCU faacf86
fix AutoChangeWindow
LorisYounger 9bf10c2
Merge branch 'dev-靠边检测' of https://github.com/LorisYounger/VPet into …
LorisYounger f0aca0b
Potential fix for pull request finding
LorisYounger abcd3e6
Potential fix for pull request finding
LorisYounger c06955f
Merge branch 'dev-靠边检测' of https://github.com/LorisYounger/VPet into …
LorisYounger 361e0f3
fix: add non-breaking defaults for IController screen APIs
Copilot 448e9f3
Normalize left side-hide Y delta by ZoomRatio
Copilot d8e8495
修复换算问题?
YIYuNCU 79594ae
修复多余变量定义
YIYuNCU 11d6f2c
修复多余变量定义
YIYuNCU 38e5027
修复设置无法正常读取问题
YIYuNCU 5b7046b
修复错误改动
YIYuNCU 6224dc3
修复屏幕下部位置优化过多的问题
YIYuNCU 405d7b6
修复设置读取错误问题
YIYuNCU 062bdb5
增加兼容代码
YIYuNCU ce419a1
增加兼容代码
YIYuNCU File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| using VPet_Simulator.Core; | ||
| using System; | ||
| using VPet_Simulator.Core; | ||
|
|
||
| namespace VPet_Simulator.Windows | ||
| { | ||
|
|
@@ -109,5 +110,44 @@ public bool CheckPosition() => mp.Dispatcher.Invoke(() => | |
|
|
||
| public int InteractionCycle => mw.Set.InteractionCycle; | ||
|
|
||
| public bool AutoChangeWindow => mw.Set.AutoChangeWindow; | ||
|
|
||
| public bool IfInActivateScreen() | ||
| { | ||
| try | ||
| { | ||
| if (mp.Dispatcher.HasShutdownStarted || mp.Dispatcher.HasShutdownFinished) return false; | ||
| } | ||
| catch { } | ||
| return mp.Dispatcher.Invoke(() => | ||
| { | ||
|
|
||
| try | ||
| { | ||
| var screen = System.Windows.Forms.Screen.FromHandle(new System.Windows.Interop.WindowInteropHelper(mp).Handle); | ||
| var screens = System.Windows.Forms.Screen.AllScreens; | ||
| for (int i = 0; i < screens.Length; i++) | ||
| { | ||
| if (screens[i].DeviceName == screen.DeviceName) | ||
| { | ||
| if (i == mw.Set.GameScreenIndex) | ||
| { | ||
| return true; | ||
| } | ||
| } | ||
| } | ||
| return false; | ||
| } | ||
| catch (Exception) | ||
| { | ||
| return true; | ||
| } | ||
| }); | ||
| } | ||
|
|
||
| public void SetNowScreenActivate() | ||
| { | ||
|
|
||
|
Owner
Author
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. |
||
| } | ||
|
Comment on lines
+148
to
+151
|
||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.