From c74a2ec8972e37551ea4ac08f6e282081ddb42b1 Mon Sep 17 00:00:00 2001 From: qiyinxi Date: Sun, 15 Nov 2026 05:17:33 +0100 Subject: [PATCH 1/2] =?UTF-8?q?v0.3.1=EF=BC=9A=E7=89=88=E6=9C=AC=E5=8F=B7?= =?UTF-8?q?=E5=92=8C=E5=8F=91=E7=89=88=E8=AF=B4=E6=98=8E=EF=BC=88=E5=93=88?= =?UTF-8?q?=E5=B8=8C=E7=AD=89=20CI=20=E7=BC=96=E5=87=BA=E6=9D=A5=E5=86=8D?= =?UTF-8?q?=E5=A1=AB=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 2 +- release/0.3.1.md | 51 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 release/0.3.1.md diff --git a/CMakeLists.txt b/CMakeLists.txt index b380958..864a08b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.20) # macOS: the oldest release the library loads on. Without it the build machine's SDK version is used. set(CMAKE_OSX_DEPLOYMENT_TARGET "12.0" CACHE STRING "Minimum macOS version") -project(ModAVDExtras VERSION 0.3.0 LANGUAGES C) +project(ModAVDExtras VERSION 0.3.1 LANGUAGES C) set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD_REQUIRED ON) diff --git a/release/0.3.1.md b/release/0.3.1.md new file mode 100644 index 0000000..099e968 --- /dev/null +++ b/release/0.3.1.md @@ -0,0 +1,51 @@ +# ModAVDExtras v0.3.1 + +- `modavd_extras.dll`:`待 CI 编出后填` +- `external_renderer_ipc.dll`:`待 CI 编出后填` +- `libmodavd_extras.dylib`:`待 CI 编出后填` +- `libmodavd_extras.so`:`待 CI 编出后填` + +这一版修复 Windows 上模拟器退出后截图共享内存不放的问题(ModAVD/ModAVD#210)。没有新增函数,接口版本还是 3;只是 `modavd_open`、`modavd_capture` 在 Windows 上多了几种返回 `MODAVD_E_NOT_FOUND` 的情况。 + +## 变更 + +- Windows:模拟器退出后放掉截图共享内存,同一端口的下一台模拟器起来时自己重新映射(#22)。 + - 以前句柄一直映射着旧的那块,模拟器退出了也不放;同一端口的下一台(比如改成 1080p 后)再建共享内存时,拿回来的还是旧的、更小的那块,映射失败,截图共享就开不起来。 + - 打开时找出监听控制台端口的进程(就是模拟器),等它退出时关掉映射。 + - `modavd_capture` 遇到映射已经没了,最多每秒试一次映射当前这台模拟器的共享内存,没有就返回 `MODAVD_E_NOT_FOUND`,过一会儿再调就行,句柄会自己映射下一台的。 + - `modavd_open` 普通打开时,共享内存在、控制台端口却没人监听,说明是别的程序留着的旧的:不映射,返回 `MODAVD_E_NOT_FOUND`。带 `MODAVD_OPEN_NO_START` 的照旧信任现有映射。 + - MuMu 形状的外壳 `external_renderer_ipc.dll` 走同一条抓图路径。 +- `include/modavd_extras.h` 补上了上面这些返回值的说明。 +- `modavd_version_string()` 返回 `"0.3.1"`。 + +## 说明 + +- 点击、按键、文字的行为没变;Linux、macOS 的代码没变。 +- 两个 Windows DLL 的字节都变了:库的代码改了,外壳静态链接着它。 + +## 许可证与源码 + +- LGPL-3.0-or-later。正文是 tag 下的 [LICENSE](https://github.com/ModAVD/ModAVDExtras/blob/v0.3.1/LICENSE)(LGPL-3.0)和 [COPYING](https://github.com/ModAVD/ModAVDExtras/blob/v0.3.1/COPYING)(GPL-3.0);转发这些库时请一起带上。 +- 源码:。 + +## 下载与核对 + +四个文件都由本仓库的 release workflow 在 GitHub 上编出,和 tag 下的 `release/0.3.1.SHA256SUMS.txt` 核对过才上传。编译环境和 v0.3.0 一样: + +- Windows:`windows-2025`,`cmake -A x64`,`--config Release`。两个 DLL 都静态链接 C 运行库,只依赖 `KERNEL32`、`WS2_32`,编译带 `/Brepro`。 +- 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 + +This release fixes the screenshot shared memory not being released on Windows after the emulator exits (ModAVD/ModAVD#210). No functions were added and the API version is still 3; `modavd_open` and `modavd_capture` just return `MODAVD_E_NOT_FOUND` in a few more cases on Windows. + +- Windows: the mapping is released when the emulator exits, and the next emulator on the same port is mapped by the handle itself (#22). Before, the handle kept the old region mapped; the next emulator on the port (for example after switching to 1080p) got the old, smaller region back and the mapping failed, so frame sharing could not start. +- The handle finds the process listening on the console port (the emulator) and closes the mapping when it exits. If the mapping is gone, `modavd_capture` tries to map the current emulator's region at most once a second and returns `MODAVD_E_NOT_FOUND` while there is none; call again later. +- A plain `modavd_open` with a region present but nothing listening on the console port treats the region as left over by another program: it does not map it and returns `MODAVD_E_NOT_FOUND`. With `MODAVD_OPEN_NO_START` the existing mapping is trusted as before. +- The MuMu-shaped shim `external_renderer_ipc.dll` uses the same capture path. `include/modavd_extras.h` documents the return values. `modavd_version_string()` returns `"0.3.1"`. +- Touch, keys and text behave as before; the Linux and macOS code is unchanged. Both Windows DLLs differ from v0.3.0. +- License: LGPL-3.0-or-later; the texts are [LICENSE](https://github.com/ModAVD/ModAVDExtras/blob/v0.3.1/LICENSE) (LGPL-3.0) and [COPYING](https://github.com/ModAVD/ModAVDExtras/blob/v0.3.1/COPYING) (GPL-3.0) at the tag. Ship them with the libraries. Source: . +- All four files are built by this repository's release workflow on GitHub, the same way as v0.3.0, and checked against `release/0.3.1.SHA256SUMS.txt` at the tag before upload. Check them with the attached `SHA256SUMS.txt`. \ No newline at end of file From 118bc35df917038b47840ddc29d42f1dbfdbafe9 Mon Sep 17 00:00:00 2001 From: qiyinxi Date: Sun, 15 Nov 2026 05:20:08 +0100 Subject: [PATCH 2/2] =?UTF-8?q?v0.3.1=EF=BC=9A=E5=A1=AB=E4=B8=8A=20CI=20?= =?UTF-8?q?=E7=BC=96=E5=87=BA=E7=9A=84=E5=9B=9B=E4=B8=AA=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E5=93=88=E5=B8=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- release/0.3.1.SHA256SUMS.txt | 4 ++++ release/0.3.1.md | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 release/0.3.1.SHA256SUMS.txt diff --git a/release/0.3.1.SHA256SUMS.txt b/release/0.3.1.SHA256SUMS.txt new file mode 100644 index 0000000..369bb84 --- /dev/null +++ b/release/0.3.1.SHA256SUMS.txt @@ -0,0 +1,4 @@ +2ca4031b57ab1cb17128ed472bf8b49ce65a9c6453f29fe37473a6d8b60a9cb6 external_renderer_ipc.dll +9950a940a726559da079bb7b97a0d8c6e3fc1d77a30489cae52b3e87513a4e61 libmodavd_extras.dylib +b19a24eedea6949f2c081a20c92c474ceb3b3269e08b241c677588fbb2e10918 libmodavd_extras.so +2d9104bf0795722a9ee94e7136721c836f71b0d20ba93ed21297e98ffcfc8ab7 modavd_extras.dll diff --git a/release/0.3.1.md b/release/0.3.1.md index 099e968..7283f8e 100644 --- a/release/0.3.1.md +++ b/release/0.3.1.md @@ -1,9 +1,9 @@ # ModAVDExtras v0.3.1 -- `modavd_extras.dll`:`待 CI 编出后填` -- `external_renderer_ipc.dll`:`待 CI 编出后填` -- `libmodavd_extras.dylib`:`待 CI 编出后填` -- `libmodavd_extras.so`:`待 CI 编出后填` +- `modavd_extras.dll`:`2d9104bf0795722a9ee94e7136721c836f71b0d20ba93ed21297e98ffcfc8ab7` +- `external_renderer_ipc.dll`:`2ca4031b57ab1cb17128ed472bf8b49ce65a9c6453f29fe37473a6d8b60a9cb6` +- `libmodavd_extras.dylib`:`9950a940a726559da079bb7b97a0d8c6e3fc1d77a30489cae52b3e87513a4e61` +- `libmodavd_extras.so`:`b19a24eedea6949f2c081a20c92c474ceb3b3269e08b241c677588fbb2e10918` 这一版修复 Windows 上模拟器退出后截图共享内存不放的问题(ModAVD/ModAVD#210)。没有新增函数,接口版本还是 3;只是 `modavd_open`、`modavd_capture` 在 Windows 上多了几种返回 `MODAVD_E_NOT_FOUND` 的情况。