mirror of
https://github.com/italicsjenga/rust_minifb.git
synced 2024-12-23 11:21:30 +11:00
Windows: Fix mouse positions not honoring MouseMode (#223)
This commit is contained in:
parent
a3852bab8a
commit
5e29a18ff4
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue