From 2157290f64c369a37f03de53ebb13b74a81e849a Mon Sep 17 00:00:00 2001 From: nashaofu Date: Sat, 13 Jul 2024 16:23:18 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E6=80=A7?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/windows/capture.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/windows/capture.rs b/src/windows/capture.rs index b4f260d..446c6fe 100644 --- a/src/windows/capture.rs +++ b/src/windows/capture.rs @@ -64,10 +64,11 @@ fn to_rgba_image( } }; + let is_old_version = get_os_major_version() < 8; for src in buffer.chunks_exact_mut(4) { src.swap(0, 2); // fix https://github.com/nashaofu/xcap/issues/92#issuecomment-1910014951 - if src[3] == 0 && get_os_major_version() < 8 { + if src[3] == 0 && is_old_version { src[3] = 255; } } From c4423953f2650fea1512c9920784b07783d70478 Mon Sep 17 00:00:00 2001 From: nashaofu Date: Sun, 11 Aug 2024 11:33:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20=E4=BF=AE=E6=94=B9=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7573935..9a82267 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xcap" -version = "0.0.10" +version = "0.0.11" edition = "2021" description = "XCap is a cross-platform screen capture library written in Rust. It supports Linux (X11, Wayland), MacOS, and Windows. XCap supports screenshot and video recording (to be implemented)." license = "Apache-2.0"