Windows: Fix mouse positions not honoring MouseMode (#223)

This commit is contained in:
Santeri Salmijärvi 2020-11-05 19:44:41 +02:00 committed by GitHub
parent a3852bab8a
commit 5e29a18ff4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -680,16 +680,15 @@ impl Window {
let h = self.height as f32;
// TODO: Needs to be fixed with resize support
mouse_handler::get_pos(mode, self.mouse.x, self.mouse.y, s, w * s, h * s)
mouse_handler::get_pos(mode, self.mouse.x, self.mouse.y, s, w, h)
}
pub fn get_unscaled_mouse_pos(&self, mode: MouseMode) -> Option<(f32, f32)> {
let s = self.scale_factor as f32;
let w = self.width as f32;
let h = self.height as f32;
// TODO: Needs to be fixed with resize support
mouse_handler::get_pos(mode, self.mouse.x, self.mouse.y, 1.0, w * s, h * s)
mouse_handler::get_pos(mode, self.mouse.x, self.mouse.y, 1.0, w, h)
}
pub fn get_mouse_down(&self, button: MouseButton) -> bool {