diff --git a/Cargo.lock b/Cargo.lock index b62e1b5..18618a5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -548,7 +548,7 @@ dependencies = [ [[package]] name = "windows-capture" -version = "1.0.38" +version = "1.0.39" dependencies = [ "image", "log", @@ -560,7 +560,7 @@ dependencies = [ [[package]] name = "windows-capture-python" -version = "1.0.38" +version = "1.0.39" dependencies = [ "pyo3", "windows", diff --git a/Cargo.toml b/Cargo.toml index 2f26712..ea05c07 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windows-capture" -version = "1.0.38" +version = "1.0.39" authors = ["NiiightmareXD"] edition = "2021" description = "Fastest Windows Screen Capture Library For Rust 🔥" diff --git a/README.md b/README.md index 548ab7a..41953c0 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Add this library to your `Cargo.toml`: ```toml [dependencies] -windows-capture = "1.0.38" +windows-capture = "1.0.39" ``` or run this command diff --git a/obs.c b/obs.c deleted file mode 100644 index ad8248f..0000000 --- a/obs.c +++ /dev/null @@ -1,70 +0,0 @@ -static bool GetMonitorTarget(LPCWSTR device, - DISPLAYCONFIG_TARGET_DEVICE_NAME *target) -{ - bool found = false; - - UINT32 numPath, numMode; - if (GetDisplayConfigBufferSizes(QDC_ONLY_ACTIVE_PATHS, &numPath, - &numMode) == ERROR_SUCCESS) { - DISPLAYCONFIG_PATH_INFO *paths = - bmalloc(numPath * sizeof(DISPLAYCONFIG_PATH_INFO)); - DISPLAYCONFIG_MODE_INFO *modes = - bmalloc(numMode * sizeof(DISPLAYCONFIG_MODE_INFO)); - if (QueryDisplayConfig(QDC_ONLY_ACTIVE_PATHS, &numPath, paths, - &numMode, modes, - NULL) == ERROR_SUCCESS) { - for (size_t i = 0; i < numPath; ++i) { - const DISPLAYCONFIG_PATH_INFO *const path = - &paths[i]; - - DISPLAYCONFIG_SOURCE_DEVICE_NAME - source; - source.header.type = - DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME; - source.header.size = sizeof(source); - source.header.adapterId = - path->sourceInfo.adapterId; - source.header.id = path->sourceInfo.id; - if (DisplayConfigGetDeviceInfo( - &source.header) == ERROR_SUCCESS && - wcscmp(device, source.viewGdiDeviceName) == - 0) { - target->header.type = - DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME; - target->header.size = sizeof(*target); - target->header.adapterId = - path->sourceInfo.adapterId; - target->header.id = path->targetInfo.id; - found = DisplayConfigGetDeviceInfo( - &target->header) == - ERROR_SUCCESS; - break; - } - } - } - - bfree(modes); - bfree(paths); - } - - return found; -} - -static void GetMonitorName(HMONITOR handle, char *name, size_t count) -{ - MONITORINFOEXW mi; - DISPLAYCONFIG_TARGET_DEVICE_NAME target; - - mi.cbSize = sizeof(mi); - if (GetMonitorInfoW(handle, (LPMONITORINFO)&mi) && - GetMonitorTarget(mi.szDevice, &target)) { - char *friendly_name; - os_wcs_to_utf8_ptr(target.monitorFriendlyDeviceName, 0, - &friendly_name); - - strcpy_s(name, count, friendly_name); - bfree(friendly_name); - } else { - strcpy_s(name, count, "[OBS: Unknown]"); - } -} \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 38f9f38..a369fcc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,7 +22,7 @@ //! //! ```toml //! [dependencies] -//! windows-capture = "1.0.38" +//! windows-capture = "1.0.39" //! ``` //! or run this command //! diff --git a/windows-capture-python/Cargo.lock b/windows-capture-python/Cargo.lock index bf24a91..247ad1c 100644 --- a/windows-capture-python/Cargo.lock +++ b/windows-capture-python/Cargo.lock @@ -131,7 +131,7 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.38" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ diff --git a/windows-capture-python/Cargo.toml b/windows-capture-python/Cargo.toml index 46a80f6..c815d94 100644 --- a/windows-capture-python/Cargo.toml +++ b/windows-capture-python/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windows-capture-python" -version = "1.0.38" +version = "1.0.39" authors = ["NiiightmareXD"] edition = "2021" description = "Fastest Windows Screen Capture Library For Python 🔥" diff --git a/windows-capture-python/pyproject.toml b/windows-capture-python/pyproject.toml index a8bbde0..ae0ff52 100644 --- a/windows-capture-python/pyproject.toml +++ b/windows-capture-python/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "windows-capture" -version = "1.0.38" +version = "1.0.39" description = "Fastest Windows Screen Capture Library For Python 🔥" readme = "README.md" requires-python = ">=3.9"