Skip to content

Docs: Mouse events in device orientation and device motion callbacks? #23915

Closed

Description

@davidhiberbom

.. c:function:: EMSCRIPTEN_RESULT emscripten_get_deviceorientation_status(EmscriptenDeviceOrientationEvent *orientationState)
Returns the most recently received ``deviceorientation`` event state.
Note that for this function call to succeed, :c:func:`emscripten_set_deviceorientation_callback` must have first been called with one of the mouse event types and a non-zero callback function pointer to enable the ``deviceorientation`` state capture.

The docs suggest you need to use to pass mouse events into the device orientation callback. This is a typo, right?

Same thing with device motion:

.. c:function:: EMSCRIPTEN_RESULT emscripten_get_devicemotion_status(EmscriptenDeviceMotionEvent *motionState)
Returns the most recently received `devicemotion <http://w3c.github.io/deviceorientation/spec-source-orientation.html#devicemotion>`_ event state.
Note that for this function call to succeed, :c:func:`emscripten_set_devicemotion_callback` must have first been called with one of the mouse event types and a non-zero callback function pointer to enable the ``devicemotion`` state capture.

Activity

  1. sbc100 commented on Mar 13, 2025

    @sbc100
    Collaborator

    Looks like a typo yes. Would you have time to send a PR?

  2. davidhiberbom commented on Mar 13, 2025

    @davidhiberbom
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions