Skip to content

Conversation

bigspider
Copy link
Contributor

No description provided.

Better type annotations in the C SDK make it possible to not mutate
the seph_buffer, which can therefore be passed as a reference instead
of copying. In order for this to work, however, process_event need to
not mutate &self, which was necessary in order to call self.reply()
and update the buttons state (on X/S+ only).
By changing the return value to a Result, we can bubble up the error
instead; for the buttons, we can work on a temporary copy instead of
borrowing the entirety of &self mutably.

This avoids having to copy the io_buffer into the seph_buffer before
calling process_event.

This is technically a breaking change because process_event is
public. However, no app uses it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant