From b4876da2aa66cdfff72d58ddf194924535517575 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Tue, 23 Mar 2021 22:41:04 -0700 Subject: [PATCH] fix windows build --- window/src/os/windows/wgl.rs | 2 +- window/src/os/windows/window.rs | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/window/src/os/windows/wgl.rs b/window/src/os/windows/wgl.rs index 306b7d67b..f6fa0363a 100644 --- a/window/src/os/windows/wgl.rs +++ b/window/src/os/windows/wgl.rs @@ -93,7 +93,7 @@ impl WglWrapper { } fn create() -> anyhow::Result { - if crate::configuration::config().prefer_swrast() { + if crate::configuration::prefer_swrast() { let mesa_dir = std::env::current_exe() .unwrap() .parent() diff --git a/window/src/os/windows/window.rs b/window/src/os/windows/window.rs index 9ca88217c..6611a7bcf 100644 --- a/window/src/os/windows/window.rs +++ b/window/src/os/windows/window.rs @@ -19,7 +19,6 @@ use std::io::{self, Error as IoError}; use std::os::windows::ffi::OsStringExt; use std::ptr::{null, null_mut}; use std::rc::Rc; -use std::sync::Arc; use winapi::shared::minwindef::*; use winapi::shared::ntdef::*; use winapi::shared::windef::*; @@ -1282,7 +1281,7 @@ impl KeyboardLayoutInfo { state[VK_MENU as usize] = 0x80; for vk in 0..=255u32 { - if vk == VK_PACKET as _ { + if vk == VK_PACKET as u32 { // Avoid false positives continue; } @@ -1331,7 +1330,7 @@ impl KeyboardLayoutInfo { Self::apply_mods(mods, &mut state); for vk in 0..=255u32 { - if vk == VK_PACKET as _ { + if vk == VK_PACKET as u32 { // Avoid false positives continue; } @@ -1523,7 +1522,7 @@ unsafe fn key(hwnd: HWND, msg: UINT, wparam: WPARAM, lparam: LPARAM) -> Option> 16) & 0xff) as u8; let releasing = (lparam & (1 << 31)) != 0; - let ime_active = wparam == VK_PROCESSKEY as _; + let ime_active = wparam == VK_PROCESSKEY as WPARAM; /* let alt_pressed = (lparam & (1 << 29)) != 0;