Skip to content

[ndk 0.7.0] Allow any non-zero return code from AInputQueue_preDispatchEvent() #322

@korejan

Description

@korejan

Hello, I believe the behaviour of InputQueue::pre_dispatch in v0.7 is wrong compared to v0.6, the ndk docs for AInputQueue_preDispatchEvent say this about the return value:

...Returns 0 if it was not pre-dispatched, meaning you can process it right now. If non-zero is returned, you must abandon the current event processing and allow the event to appear again in the event queue (if it does not get consumed during pre-dispatching).

Compared to the docs for the return value of AInputQueue_hasEvents (which the current version of InputQueue::has_events handles correctly):

Returns 1 if the queue has events; 0 if it does not have events; and a negative value if there is an error.

On the Quest 2, when the system menu is shown, the return value of AInputQueue_preDispatchEvent is -1 thus invoking the unreachable case. This does not happen with v0.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    difficulty: easyLikely easier than most tasks heretype: bugDang, that shouldn't have happened

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions