Remove DeviceEvent::Motion and WindowEvent::AxisMotion
We decided to remove them because they contained too little information for the user to be useful. The assumption is that they were originally implemented to enable gamepad support, which we already decided we are not going to add directly to Winit.
This commit is contained in:
parent
b7a7f59298
commit
546962c904
8 changed files with 9 additions and 79 deletions
|
|
@ -2382,7 +2382,7 @@ unsafe extern "system" fn thread_event_target_callback(
|
|||
}
|
||||
|
||||
unsafe fn handle_raw_input(userdata: &ThreadMsgTargetData, data: RAWINPUT) {
|
||||
use crate::event::DeviceEvent::{Button, Key, Motion, MouseMotion, MouseWheel};
|
||||
use crate::event::DeviceEvent::{Button, Key, MouseMotion, MouseWheel};
|
||||
use crate::event::ElementState::{Pressed, Released};
|
||||
use crate::event::MouseScrollDelta::LineDelta;
|
||||
|
||||
|
|
@ -2395,20 +2395,6 @@ unsafe fn handle_raw_input(userdata: &ThreadMsgTargetData, data: RAWINPUT) {
|
|||
let x = mouse.lLastX as f64;
|
||||
let y = mouse.lLastY as f64;
|
||||
|
||||
if x != 0.0 {
|
||||
userdata.send_event(Event::DeviceEvent {
|
||||
device_id,
|
||||
event: Motion { axis: 0, value: x },
|
||||
});
|
||||
}
|
||||
|
||||
if y != 0.0 {
|
||||
userdata.send_event(Event::DeviceEvent {
|
||||
device_id,
|
||||
event: Motion { axis: 1, value: y },
|
||||
});
|
||||
}
|
||||
|
||||
if x != 0.0 || y != 0.0 {
|
||||
userdata.send_event(Event::DeviceEvent {
|
||||
device_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue