Skip to content
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

希望能适配一下 WSA (Windows 11) #268

Open
fhyuncai opened this issue Oct 21, 2021 · 9 comments
Open

希望能适配一下 WSA (Windows 11) #268

fhyuncai opened this issue Oct 21, 2021 · 9 comments
Labels
wontfix This will not be worked on

Comments

@fhyuncai
Copy link

No description provided.

@dantmnf
Copy link
Collaborator

dantmnf commented Oct 22, 2021

WSA 目前没有实现 AOSP screencap 需要的接口,无法进行截图。

可能的解决方案:

  1. 在 ADB shell 里用 app_process 载入 java 代码调用系统 framework 获取 view 的截图 👈需要写一堆 Java;
  2. 使用 Windows.Graphics.Capture 获取窗口的 DXGI Surface,并且复制回 CPU 👈需要写一堆 COM;
  3. 等微软修好 screencap 🙃

@dantmnf
Copy link
Collaborator

dantmnf commented Jan 13, 2022

WSA 1.8.32836.0 版本已经修好了 gralloc,可以通过 screencap 进行截图。

@dantmnf
Copy link
Collaborator

dantmnf commented Jan 28, 2022

需要解决的问题:

  • WSA 会给每个应用创建独立的 display,截图和控制需要指定 display ID
  • 实现 WSA 多个窗口/应用的枚举
  • 修改、固定 WSA 窗口的分辨率

@pboymt
Copy link

pboymt commented Feb 8, 2022

需要解决的问题:

  • WSA 会给每个应用创建独立的 display,截图和控制需要指定 display ID
  • 实现 WSA 多个窗口/应用的枚举
  • 修改、固定 WSA 窗口的分辨率

你需要pywin32库,里面有EnumWindows方法枚举所有窗口的元数据,还有SetWindowRect方法设置窗口尺寸,但不清楚处理WSA窗口是否需要管理员权限。

@dantmnf
Copy link
Collaborator

dantmnf commented Feb 8, 2022

你需要pywin32库,里面有EnumWindows方法枚举所有窗口的元数据,还有SetWindowRect方法设置窗口尺寸,但不清楚处理WSA窗口是否需要管理员权限。

这个我知道,但是目前 WSA 的图形性能还没达到能玩的标准,所以就先鸽着了(

@pboymt
Copy link

pboymt commented Feb 8, 2022

你需要pywin32库,里面有EnumWindows方法枚举所有窗口的元数据,还有SetWindowRect方法设置窗口尺寸,但不清楚处理WSA窗口是否需要管理员权限。

这个我知道,但是目前 WSA 的图形性能还没达到能玩的标准,所以就先鸽着了(

那我多虑了,我还以为都能玩游戏了(

@dantmnf
Copy link
Collaborator

dantmnf commented Jun 8, 2022

新版 WSA 改用了安卓的原生多窗口机制,已经无法通过 adb 可靠截图/控制了。

win32 控制不支持多点触摸,所以先来个 wontfix 吧(

@psi-cmd
Copy link

psi-cmd commented Sep 30, 2022

现在代码不经任何修改就可以正常跑该脚本。简单起见只跑方舟窗口,用 F11 快捷键对窗口真全屏后可以让截图黑框消失,此时 screencaps 可以正常进行屏幕截取。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

5 participants
@dantmnf @pboymt @fhyuncai @psi-cmd and others