Updated winit to 0.27.2 for examples and raw-window-handle to 0.5.0

This commit is contained in:
David Johnson 2022-08-24 00:16:20 -05:00
parent bef3c52706
commit d30d3255c2
8 changed files with 72 additions and 41 deletions

View file

@ -1,5 +1,5 @@
use crate::{GraphicsContextImpl, SoftBufferError};
use raw_window_handle::{HasRawWindowHandle, Win32Handle};
use raw_window_handle::{HasRawWindowHandle, Win32WindowHandle};
use std::os::raw::c_int;
use winapi::shared::windef::{HDC, HWND};
use winapi::um::wingdi::{StretchDIBits, BITMAPINFOHEADER, BI_BITFIELDS, RGBQUAD};
@ -19,7 +19,7 @@ struct BitmapInfo {
}
impl Win32Impl {
pub unsafe fn new<W: HasRawWindowHandle>(handle: &Win32Handle) -> Result<Self, crate::SoftBufferError<W>> {
pub unsafe fn new<W: HasRawWindowHandle>(handle: &Win32WindowHandle) -> Result<Self, crate::SoftBufferError<W>> {
let dc = GetDC(handle.hwnd as HWND);
if dc.is_null(){