Repository navigation
v0.1.2:Release 加上 macOS、Linux 的库 (#10)
ModAVDExtras v0.1.2
modavd_extras.dll:a5ef972919d76c7821225ada2d67d322b2f0128e195ba34d69bbf9aa9759dabaexternal_renderer_ipc.dll:8a0a82a59745da36e93eba6278dbacfab67616a415fd0780b24a9b03f7bb99edlibmodavd_extras.dylib:84fbbdd76fc3262bae9e058777d4bc20c800426883ce3f47ac29ec7d2ed5cb62libmodavd_extras.so:c18c2b2f1f00346b944c2bd85213b8654b557fbe7dc7bd04670e84e782cbef56
这一版起 Release 也带 macOS、Linux 的库;另外修了 Linux、macOS 上截图会拿到旧画面的问题。接口版本还是 1,头文件只改了注释,调用方不用重编。
新增
- macOS arm64 的
libmodavd_extras.dylib(macOS 12 起能载入)和 Linux x64 的libmodavd_extras.so(要 glibc 2.34 或更新)。- 接口和 Windows 的
modavd_extras.dll一样,见include/modavd_extras.h。 - macOS 上有贡献者在 Apple Silicon 上用官方 Emulator 37.2.13、API 35 ARM64 实测过截图。Linux 还没有在模拟器上实测。
- 接口和 Windows 的
修复
- Linux、macOS:模拟器退出后共享内存还在,下次冷启动时库直接认了上次的末帧,截到的一直是旧画面(#8)。现在
modavd_open默认先经控制台开流,成功了才打开映射;控制台鉴权或命令失败时返回MODAVD_E_IO,不再被旧映射掩盖。确定映射属于当前实例、而且已经在开流的,可以带MODAVD_OPEN_NO_START跳过控制台。 - 所有平台:开了流、第一帧还没到时,
modavd_capture返回MODAVD_E_NOT_READY,以前返回成功和一张全黑的图(#8)。稍后再调就行。 external_renderer_ipc.dll:行为不变。第一帧到之前照旧交出尺寸和黑图、返回成功,和它替换的 DLL 一样,因为 MaaCore 连上时马上要问尺寸,失败就放弃这条路(#9)。modavd_version_string()返回"0.1.2"。
许可证与源码
- LGPL-3.0-or-later。正文是 tag 下的 LICENSE(LGPL-3.0)和 COPYING(GPL-3.0);转发这些库时请一起带上。
- 源码:https://github.com/ModAVD/ModAVDExtras/tree/v0.1.2。
下载与核对
四个文件都由本仓库的 release workflow 在 GitHub 上编出,和 tag 下的 release/0.1.2.SHA256SUMS.txt 核对过才上传:
- Windows:
windows-2025,cmake -A x64,--config Release。两个 DLL 都静态链接 C 运行库,只依赖KERNEL32、WS2_32。编译带/Brepro:同样的命令、同一版本的 MSVC 和 Windows SDK 能编出相同的字节。MSVC 版本在 workflow 日志里 CMake 配置那一步,Windows SDK 跟着 runner 镜像,镜像版本在「Set up job」那一步。 - macOS:
macos-15(Apple Silicon),cmake -DCMAKE_BUILD_TYPE=Release。 - Linux:
ubuntu-24.04(x64),cmake -DCMAKE_BUILD_TYPE=Release。
请用附件 SHA256SUMS.txt 核对:Windows 上 Get-FileHash .\modavd_extras.dll -Algorithm SHA256,macOS 上 shasum -a 256 libmodavd_extras.dylib,Linux 上 sha256sum libmodavd_extras.so。
English
From this release the releases also carry the macOS and Linux libraries, and a Linux / macOS issue where capture returned a stale frame is fixed. The API version is still 1 and only comments changed in the header, so callers need not rebuild.
- New:
libmodavd_extras.dylibfor macOS arm64 (loads on macOS 12 and later) andlibmodavd_extras.sofor Linux x64 (needs glibc 2.34 or later), with the same API asmodavd_extras.dll(include/modavd_extras.h). A contributor tested capture on Apple Silicon with the official Emulator 37.2.13 and API 35 ARM64; Linux has not been tested with an emulator yet. - Fixed on Linux and macOS: the shared memory outlives the emulator, so on the next cold boot the library took the last frame of the previous run and kept returning it (#8). By default
modavd_opennow starts frame sharing through the console before it opens the mapping; console auth or command failures returnMODAVD_E_IOinstead of being hidden by an old mapping. Callers that know the mapping belongs to the running instance and sharing is on can passMODAVD_OPEN_NO_STARTto skip the console. - Fixed on all platforms: after sharing starts and before the first frame arrives,
modavd_capturereturnsMODAVD_E_NOT_READYinstead of success and an all-black frame (#8). Call again a little later. external_renderer_ipc.dll: unchanged behaviour. Before the first frame it still reports the size and a black frame with success, as the DLL it replaces did, because MaaCore asks for the size right after connecting and gives up on that path if it fails (#9).modavd_version_string()returns"0.1.2".- License: LGPL-3.0-or-later; the texts are LICENSE (LGPL-3.0) and COPYING (GPL-3.0) at the tag. Ship them with the libraries. Source: https://github.com/ModAVD/ModAVDExtras/tree/v0.1.2.
- All four files are built by this repository's release workflow on GitHub (Windows:
windows-2025,cmake -A x64,--config Release, with/Brepro, static C runtime, depending only onKERNEL32andWS2_32; macOS:macos-15on Apple Silicon; Linux:ubuntu-24.04x64; bothcmake -DCMAKE_BUILD_TYPE=Release) and checked againstrelease/0.1.2.SHA256SUMS.txtat the tag before upload. Check them with the attachedSHA256SUMS.txt.