Skip to content

Commit

Permalink
fix: version up
Browse files Browse the repository at this point in the history
  • Loading branch information
exbucks committed Sep 8, 2023
1 parent e3d9a6d commit 45b035a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ core-graphics = "0.22"
[target.'cfg(target_os = "windows")'.dependencies]
fxhash = "0.2"
widestring = "1.0"
windows = { version = "0.48", features = [
windows = { version = "0.51.1", features = [
"Win32_Foundation",
"Win32_Graphics_Gdi",
] }
Expand Down
6 changes: 3 additions & 3 deletions src/win32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use windows::{
Win32::{
Foundation::{BOOL, LPARAM, RECT},
Graphics::Gdi::{
CreateCompatibleBitmap, CreateCompatibleDC, CreateDCW, CreatedHDC, DeleteDC,
CreateCompatibleBitmap, CreateCompatibleDC, CreateDCW, DeleteDC,
DeleteObject, EnumDisplayMonitors, GetDIBits, GetMonitorInfoW, GetObjectW,
SelectObject, SetStretchBltMode, StretchBlt, BITMAP, BITMAPINFO, BITMAPINFOHEADER,
DIB_RGB_COLORS, HBITMAP, HDC, HMONITOR, MONITORINFOEXW, RGBQUAD, SRCCOPY,
Expand Down Expand Up @@ -106,7 +106,7 @@ fn capture(display_id: u32, x: i32, y: i32, width: i32, height: i32) -> Result<R
let sz_device_ptr = sz_device.as_ptr();

let dcw_drop_box = drop_box!(
CreatedHDC,
HDC,
unsafe {
CreateDCW(
PCWSTR(sz_device_ptr),
Expand All @@ -119,7 +119,7 @@ fn capture(display_id: u32, x: i32, y: i32, width: i32, height: i32) -> Result<R
);

let compatible_dc_drop_box = drop_box!(
CreatedHDC,
HDC,
unsafe { CreateCompatibleDC(*dcw_drop_box) },
|compatible_dc| unsafe { DeleteDC(compatible_dc) }
);
Expand Down

0 comments on commit 45b035a

Please sign in to comment.