Repository navigation
[Breaking change] feat: support Win32ScreencapMethods speed test #29
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
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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
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
43 changes: 0 additions & 43 deletions
43
src/MaaFramework.Binding/Enums/Controllers/Win32ScreencapMethod.cs
This file was deleted.
Oops, something went wrong.
60 changes: 60 additions & 0 deletions
60
src/MaaFramework.Binding/Enums/Controllers/Win32ScreencapMethods.cs
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 |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| //------------------------------------------------------------------------------ | ||
| // <auto-generated> | ||
| // This code was generated by a tool. | ||
| // | ||
| // Changes to this file may cause incorrect behavior and will be lost if | ||
| // the code is regenerated. | ||
| // </auto-generated> | ||
| //------------------------------------------------------------------------------ | ||
|
|
||
| #pragma warning disable CS1573 // 参数在 XML 注释中没有匹配的 param 标记 | ||
| #pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 | ||
|
|
||
| namespace MaaFramework.Binding; | ||
|
|
||
| /// <summary> | ||
| /// Win32 screencap method flags | ||
| /// | ||
| /// <para>Use bitwise OR to set the methods you need. | ||
| /// <br/>MaaFramework will test all provided methods and use the fastest available one.</para> | ||
| /// | ||
| /// <para>No default value. Client should choose one as default.</para> | ||
| /// | ||
|
moomiji marked this conversation as resolved.
Resolved
|
||
| /// <para>Predefined combinations: | ||
| /// <br/>- Foreground: DXGI_DesktopDup_Window | ScreenDC | ||
| /// <br/>- Background: FramePool | PrintWindow</para> | ||
| /// | ||
| /// <para>Different applications use different rendering methods, there is no universal solution.</para> | ||
| /// | ||
| /// <code>| Method | Speed | Compatibility | Require Admin | Background Support | Notes | | ||
| /// <br/>|-------------------------|-----------|---------------|---------------|--------------------|----------------------------------| | ||
| /// <br/>| GDI | Fast | Medium | No | No | | | ||
| /// <br/>| FramePool | Very Fast | Medium | No | Yes | Requires Windows 10 1903+ | | ||
| /// <br/>| DXGI_DesktopDup | Very Fast | Low | No | No | Desktop duplication (full screen)| | ||
| /// <br/>| DXGI_DesktopDup_Window | Very Fast | Low | No | No | Desktop duplication then crop | | ||
| /// <br/>| PrintWindow | Medium | Medium | No | Yes | | | ||
| /// <br/>| ScreenDC | Fast | High | No | No | | | ||
| /// </code> | ||
| /// | ||
| /// <para>Note: FramePool and PrintWindow support pseudo-minimize — when the target window | ||
| /// <br/>is minimized, they make it transparent and click-through, then restore it without | ||
| /// <br/>activation, allowing screencap to continue without disturbing the user. | ||
| /// <br/>Other screencap methods will fail when the target window is minimized.</para> | ||
| /// | ||
| /// </summary> | ||
| [Flags] | ||
| public enum Win32ScreencapMethods : System.UInt64 | ||
| { | ||
| None = 0, | ||
| GDI = 1, | ||
| FramePool = (1 << 1), | ||
| DXGI_DesktopDup = (1 << 2), | ||
| DXGI_DesktopDup_Window = (1 << 3), | ||
| PrintWindow = (1 << 4), | ||
| ScreenDC = (1 << 5), | ||
|
|
||
| All = ~None, | ||
| Foreground = DXGI_DesktopDup_Window | ScreenDC, | ||
|
moomiji marked this conversation as resolved.
Resolved
|
||
| Background = FramePool | PrintWindow, | ||
| } | ||
|
|
||
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
Oops, something went wrong.
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.