Web: use raw data in DeviceEvent::MouseMotion (#3803)
Only supported on Chrome MacOS and Windows.
This commit is contained in:
parent
ef580b817d
commit
2e97ab3d4f
9 changed files with 190 additions and 29 deletions
16
src/event.rs
16
src/event.rs
|
|
@ -467,6 +467,22 @@ pub enum DeviceEvent {
|
|||
///
|
||||
/// This represents raw, unfiltered physical motion. Not to be confused with
|
||||
/// [`WindowEvent::CursorMoved`].
|
||||
///
|
||||
/// ## Platform-specific
|
||||
///
|
||||
/// **Web:** Only returns raw data, not OS accelerated, if [`CursorGrabMode::Locked`] is used
|
||||
/// and browser support is available, see
|
||||
#[cfg_attr(
|
||||
any(web_platform, docsrs),
|
||||
doc = "[`ActiveEventLoopExtWeb::is_cursor_lock_raw()`][crate::platform::web::ActiveEventLoopExtWeb::is_cursor_lock_raw()]."
|
||||
)]
|
||||
#[cfg_attr(
|
||||
not(any(web_platform, docsrs)),
|
||||
doc = "`ActiveEventLoopExtWeb::is_cursor_lock_raw()`."
|
||||
)]
|
||||
///
|
||||
#[rustfmt::skip]
|
||||
/// [`CursorGrabMode::Locked`]: crate::window::CursorGrabMode::Locked
|
||||
MouseMotion {
|
||||
/// (x, y) change in position in unspecified units.
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue