Skip to content

Commit

Permalink
Fix Typo 🔥📄
Browse files Browse the repository at this point in the history
  • Loading branch information
NiiightmareXD committed Mar 8, 2024
1 parent 759e978 commit 13954c9
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "windows-capture"
version = "1.0.65"
version = "1.0.68"
authors = ["NiiightmareXD"]
edition = "2021"
description = "Fastest Windows Screen Capture Library For Rust 🔥"
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Add this library to your `Cargo.toml`:

```toml
[dependencies]
windows-capture = "1.0.65"
windows-capture = "1.0.68"
```
or run this command

Expand All @@ -48,7 +48,7 @@ use windows_capture::{
frame::Frame,
graphics_capture_api::InternalCaptureControl,
monitor::Monitor,
settings::{ColorFormat, CursorCaptuerSettings, DrawBorderSettings, Settings},
settings::{ColorFormat, CursorCaptureSettings, DrawBorderSettings, Settings},
};

// This struct will be used to handle the capture events.
Expand Down Expand Up @@ -133,9 +133,9 @@ fn main() {
let settings = Settings::new(
// Item To Captue
primary_monitor,
// Capture Cursor
CursorCaptuerSettings::Default,
// Draw Borders (None Means Default Api Configuration)
// Capture Cursor Settings
CursorCaptureSettings::Default,
// Draw Borders Settings
DrawBorderSettings::Default,
// The desired color format for the captured frame.
ColorFormat::Rgba8,
Expand Down
8 changes: 4 additions & 4 deletions examples/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use windows_capture::{
frame::Frame,
graphics_capture_api::InternalCaptureControl,
monitor::Monitor,
settings::{ColorFormat, CursorCaptuerSettings, DrawBorderSettings, Settings},
settings::{ColorFormat, CursorCaptureSettings, DrawBorderSettings, Settings},
};

// This struct will be used to handle the capture events.
Expand Down Expand Up @@ -94,9 +94,9 @@ fn main() {
let settings = Settings::new(
// Item To Captue
primary_monitor,
// Capture Cursor
CursorCaptuerSettings::Default,
// Draw Borders (None Means Default Api Configuration)
// Capture Cursor Settings
CursorCaptureSettings::Default,
// Draw Borders Settings
DrawBorderSettings::Default,
// The desired color format for the captured frame.
ColorFormat::Rgba8,
Expand Down
14 changes: 7 additions & 7 deletions src/graphics_capture_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use crate::{
capture::GraphicsCaptureApiHandler,
d3d11::{self, create_d3d_device, create_direct3d_device, SendDirectX},
frame::Frame,
settings::{ColorFormat, CursorCaptuerSettings, DrawBorderSettings},
settings::{ColorFormat, CursorCaptureSettings, DrawBorderSettings},
};

#[derive(thiserror::Error, Eq, PartialEq, Clone, Debug)]
Expand Down Expand Up @@ -116,7 +116,7 @@ impl GraphicsCaptureApi {
>(
item: GraphicsCaptureItem,
callback: Arc<Mutex<T>>,
cursor_capture: CursorCaptuerSettings,
cursor_capture: CursorCaptureSettings,
draw_border: DrawBorderSettings,
color_format: ColorFormat,
thread_id: u32,
Expand All @@ -127,7 +127,7 @@ impl GraphicsCaptureApi {
return Err(Error::Unsupported);
}

if cursor_capture != CursorCaptuerSettings::Default
if cursor_capture != CursorCaptureSettings::Default
&& !Self::is_cursor_settings_supported()?
{
return Err(Error::CursorConfigUnsupported);
Expand Down Expand Up @@ -293,12 +293,12 @@ impl GraphicsCaptureApi {
}
}))?;

if cursor_capture != CursorCaptuerSettings::Default {
if cursor_capture != CursorCaptureSettings::Default {
if Self::is_cursor_settings_supported()? {
match cursor_capture {
CursorCaptuerSettings::Default => (),
CursorCaptuerSettings::WithCursor => session.SetIsCursorCaptureEnabled(true)?,
CursorCaptuerSettings::WithoutCursor => {
CursorCaptureSettings::Default => (),
CursorCaptureSettings::WithCursor => session.SetIsCursorCaptureEnabled(true)?,
CursorCaptureSettings::WithoutCursor => {
session.SetIsCursorCaptureEnabled(false)?
}
};
Expand Down
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
//!
//! ```toml
//! [dependencies]
//! windows-capture = "1.0.65"
//! windows-capture = "1.0.68"
//! ```
//! or run this command
//!
Expand All @@ -44,7 +44,7 @@
//! frame::Frame,
//! graphics_capture_api::InternalCaptureControl,
//! monitor::Monitor,
//! settings::{ColorFormat, CursorCaptuerSettings, DrawBorderSettings, Settings},
//! settings::{ColorFormat, CursorCaptureSettings, DrawBorderSettings, Settings},
//! };
//!
//! // This struct will be used to handle the capture events.
Expand Down Expand Up @@ -128,9 +128,9 @@
//! let settings = Settings::new(
//! // Item To Captue
//! primary_monitor,
//! // Capture Cursor
//! CursorCaptuerSettings::Default,
//! // Draw Borders (None Means Default Api Configuration)
//! // Capture Cursor Settings
//! CursorCaptureSettings::Default,
//! // Draw Borders Settings
//! DrawBorderSettings::Default,
//! // The desired color format for the captured frame.
//! ColorFormat::Rgba8,
Expand Down
6 changes: 3 additions & 3 deletions src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl Default for ColorFormat {
}

#[derive(Eq, PartialEq, Clone, Debug)]
pub enum CursorCaptuerSettings {
pub enum CursorCaptureSettings {
Default,
WithCursor,
WithoutCursor,
Expand All @@ -39,7 +39,7 @@ pub struct Settings<Flags> {
/// The graphics capture item to capture.
pub item: GraphicsCaptureItem,
/// Specifies whether to capture the cursor.
pub cursor_capture: CursorCaptuerSettings,
pub cursor_capture: CursorCaptureSettings,
/// Specifies whether to draw a border around the captured region.
pub draw_border: DrawBorderSettings,
/// The color format for the captured graphics.
Expand All @@ -64,7 +64,7 @@ impl<Flags> Settings<Flags> {
/// Returns a `Result` containing the `Settings` if successful, or an `Error` if conversion to `GraphicsCaptureItem` fails.
pub fn new<T: TryInto<GraphicsCaptureItem>>(
item: T,
cursor_capture: CursorCaptuerSettings,
cursor_capture: CursorCaptureSettings,
draw_border: DrawBorderSettings,
color_format: ColorFormat,
flags: Flags,
Expand Down
2 changes: 1 addition & 1 deletion windows-capture-python/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "windows-capture-python"
version = "1.0.65"
version = "1.0.68"
authors = ["NiiightmareXD"]
edition = "2021"
description = "Fastest Windows Screen Capture Library For Python 🔥"
Expand Down
2 changes: 1 addition & 1 deletion windows-capture-python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "maturin"

[project]
name = "windows-capture"
version = "1.0.65"
version = "1.0.68"
description = "Fastest Windows Screen Capture Library For Python 🔥"
readme = "README.md"
requires-python = ">=3.9"
Expand Down
10 changes: 5 additions & 5 deletions windows-capture-python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use ::windows_capture::{
frame::{self, Frame},
graphics_capture_api::InternalCaptureControl,
monitor::Monitor,
settings::{ColorFormat, CursorCaptuerSettings, DrawBorderSettings, Settings},
settings::{ColorFormat, CursorCaptureSettings, DrawBorderSettings, Settings},
window::Window,
};
use pyo3::{exceptions::PyException, prelude::*, types::PyList};
Expand Down Expand Up @@ -120,7 +120,7 @@ impl NativeCaptureControl {
pub struct NativeWindowsCapture {
on_frame_arrived_callback: Arc<PyObject>,
on_closed: Arc<PyObject>,
cursor_capture: CursorCaptuerSettings,
cursor_capture: CursorCaptureSettings,
draw_border: DrawBorderSettings,
monitor_index: Option<usize>,
window_name: Option<String>,
Expand Down Expand Up @@ -148,9 +148,9 @@ impl NativeWindowsCapture {
}

let cursor_capture = match cursor_capture {
Some(true) => CursorCaptuerSettings::WithCursor,
Some(false) => CursorCaptuerSettings::WithoutCursor,
None => CursorCaptuerSettings::Default,
Some(true) => CursorCaptureSettings::WithCursor,
Some(false) => CursorCaptureSettings::WithoutCursor,
None => CursorCaptureSettings::Default,
};

let draw_border = match draw_border {
Expand Down

0 comments on commit 13954c9

Please sign in to comment.